From fac0f1f668aaa5c39d4d64618c309ca3f732c28a Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sat, 23 Nov 2013 11:23:35 +0100 Subject: [PATCH] mpeg4videoparse: accept VideoObjectLayer as start of frame and config ... which it deserves as much as VideoObject. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=667564 --- gst/videoparsers/gstmpeg4videoparse.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c index b5c1288..333db5d 100644 --- a/gst/videoparsers/gstmpeg4videoparse.c +++ b/gst/videoparsers/gstmpeg4videoparse.c @@ -379,10 +379,15 @@ gst_mpeg4vparse_process_sc (GstMpeg4VParse * mp4vparse, GstMpeg4Packet * packet, GST_LOG_OBJECT (mp4vparse, "Video Object Layer"); - /* wee keep track of the offset to parse later on */ + /* we keep track of the offset to parse later on */ if (mp4vparse->vol_offset < 0) mp4vparse->vol_offset = packet->offset; + /* Video Object below is merely a start code, + * if that is considered as config, then certainly Video Object Layer + * which really contains some needed data */ + mp4vparse->config_found = TRUE; + /* VO (video object) cases */ } else if (packet->type <= GST_MPEG4_VIDEO_OBJ_LAST) { GST_LOG_OBJECT (mp4vparse, "Video object"); @@ -458,8 +463,11 @@ retry: default: if (packet.type <= GST_MPEG4_VIDEO_OBJ_LAST) break; + if (packet.type >= GST_MPEG4_VIDEO_LAYER_FIRST && + packet.type <= GST_MPEG4_VIDEO_LAYER_LAST) + break; /* undesirable sc */ - GST_LOG_OBJECT (mp4vparse, "start code is no VOS, VO, VOP or GOP"); + GST_LOG_OBJECT (mp4vparse, "start code is no VOS, VO, VOL, VOP or GOP"); goto retry; } -- 2.7.4