diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2014-01-03 15:58:26 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-01-06 10:58:32 +0100 |
commit | 5ab650d25ce00e79989d83896139a1dbd01b6fcb (patch) | |
tree | f41cb800bcf28d4732be656fcd3f44552514d57c | |
parent | 328a722277941961e9a65167a5eaf008c5d70ce4 (diff) |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=697665
-rw-r--r-- | ext/libav/gstavcodecmap.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index a5be63e..fe52cff 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -1438,7 +1438,22 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case AV_CODEC_ID_VC1: 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); + } break; case AV_CODEC_ID_QDM2: caps = |