aboutsummaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorAlessandro Decina2012-01-31 04:03:45 -0600
committerNikhil Devshatwar2013-05-15 08:17:41 -0500
commit50fce8289d6a04c277e972ef36e13e8d05f4d98c (patch)
tree83c55634ff61e98ff6e35ffeb14701b1e0c82fb2 /gst
parent7749bc942f89a69bd25dccbca701fb9cae5295e9 (diff)
downloadgst-plugins-bad0-10-50fce8289d6a04c277e972ef36e13e8d05f4d98c.tar.gz
gst-plugins-bad0-10-50fce8289d6a04c277e972ef36e13e8d05f4d98c.tar.xz
gst-plugins-bad0-10-50fce8289d6a04c277e972ef36e13e8d05f4d98c.zip
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparsers/gstvc1parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/videoparsers/gstvc1parse.c b/gst/videoparsers/gstvc1parse.c
index e38d2ac0f..16fd55ccc 100644
--- a/gst/videoparsers/gstvc1parse.c
+++ b/gst/videoparsers/gstvc1parse.c
@@ -1422,7 +1422,8 @@ gst_vc1_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
1422 value = gst_structure_get_value (s, "codec_data"); 1422 value = gst_structure_get_value (s, "codec_data");
1423 if (value != NULL) { 1423 if (value != NULL) {
1424 codec_data = gst_value_get_buffer (value); 1424 codec_data = gst_value_get_buffer (value);
1425 if (GST_BUFFER_SIZE (codec_data) == 4) { 1425 if ((GST_BUFFER_SIZE (codec_data) == 4 ||
1426 GST_BUFFER_SIZE (codec_data) == 5)) {
1426 /* ASF, VC1/WMV3 simple/main profile 1427 /* ASF, VC1/WMV3 simple/main profile
1427 * This is the sequence header without start codes 1428 * This is the sequence header without start codes
1428 */ 1429 */