vc1parse: workaround for simple/main codec_data being 5 bytes long

Sometimes the codec_data buffer for simple/main pushed by asfdemux is 5 bytes
instead of 4. When that happens, codec_data is still valid but it seems to have
one 0x00 trailing byte. Might be a bug in the demuxer, needs more investigation.
This commit is contained in:
Alessandro Decina 2012-01-31 11:03:45 +01:00 committed by Sebastian Dröge
parent 8aec23ac05
commit f287dec1a2

View file

@ -1422,7 +1422,8 @@ gst_vc1_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
value = gst_structure_get_value (s, "codec_data");
if (value != NULL) {
codec_data = gst_value_get_buffer (value);
if (GST_BUFFER_SIZE (codec_data) == 4) {
if ((GST_BUFFER_SIZE (codec_data) == 4 ||
GST_BUFFER_SIZE (codec_data) == 5)) {
/* ASF, VC1/WMV3 simple/main profile
* This is the sequence header without start codes
*/