From a3d658915b7f97b14d6cea991c7817a1e2af9c31 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sun, 10 Nov 2013 12:17:18 +0100 Subject: [PATCH] mpegvideoparse: tweak extension handling --- gst/videoparsers/gstmpegvideoparse.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index 1b2116f..bff98f8 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -501,9 +501,14 @@ gst_mpegv_parse_process_sc (GstMpegvParse * mpvparse, break; case GST_MPEG_VIDEO_PACKET_EXTENSION: GST_LOG_OBJECT (mpvparse, "startcode is VIDEO PACKET EXTENSION"); - parse_packet_extension (mpvparse, info, off); - if (mpvparse->ext_count < G_N_ELEMENTS (mpvparse->ext_offsets)) - mpvparse->ext_offsets[mpvparse->ext_count++] = off; + if (mpvparse->pic_offset >= 0) { + GST_LOG_OBJECT (mpvparse, "... considered PICTURE EXTENSION"); + parse_packet_extension (mpvparse, info, off); + } else { + GST_LOG_OBJECT (mpvparse, "... considered SEQUENCE EXTENSION"); + if (mpvparse->ext_count < G_N_ELEMENTS (mpvparse->ext_offsets)) + mpvparse->ext_offsets[mpvparse->ext_count++] = off; + } checkconfig = FALSE; break; default: -- 2.7.4