aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2014-03-30 12:43:19 +1100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-30 06:22:50 +0200
commit73a2d16bfab550325f6626c9843c2e019ef7331b (patch)
tree972789b655677b5baa82af1485be3af9f499af2b /libavformat
parentc01ddf845dcb655e6d6a3382e24bf3af63bad83c (diff)
downloadffmpeg-73a2d16bfab550325f6626c9843c2e019ef7331b.tar.gz
avformat/wtvdec: demux mpeg2 extradata
Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/wtvdec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 834198fe59..45e6b4ae8f 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -694,6 +694,15 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
avio_skip(pb, FFMAX(size - consumed, 0));
} else if (!ff_guidcmp(formattype, ff_format_mpeg2_video)) {
int consumed = parse_videoinfoheader2(s, st);
+ int count;
+ avio_skip(pb, 4);
+ count = avio_rl32(pb);
+ avio_skip(pb, 12);
+ if (count && ff_get_extradata(st->codec, pb, count) < 0) {
+ ff_free_stream(s, st);
+ return NULL;
+ }
+ consumed += 20 + count;
avio_skip(pb, FFMAX(size - consumed, 0));
} else {
if (ff_guidcmp(formattype, ff_format_none))