Commit 8770f227 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

avcodecmap: fix regression with wmv3 video in WMVA format

The VC-1 decoder should handle that. Before avdec_wmv3 handled
it, but then we added format=WMV3 to its sink pad template
caps, at which point nothing handled WMVA any longer.
parent 1409e169
......@@ -1436,7 +1436,22 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
caps =
gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-wmv",
"wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WVC1", NULL);
"wmvversion", G_TYPE_INT, 3, NULL);
if (!context && !encode) {
GValue arr = { 0, };
GValue item = { 0, };
g_value_init (&arr, GST_TYPE_LIST);
g_value_init (&item, G_TYPE_STRING);
g_value_set_string (&item, "WVC1");
gst_value_list_append_value (&arr, &item);
g_value_set_string (&item, "WMVA");
gst_value_list_append_and_take_value (&arr, &item);
gst_caps_set_value (caps, "format", &arr);
g_value_unset (&arr);
} else {
gst_caps_set_simple (caps, "format", G_TYPE_STRING, "WVC1", NULL);
caps =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment