aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-05-13 12:39:44 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-05-13 12:39:44 +0200
commit231b3317184790b6be4b4619d96fd328f13aeabb (patch)
tree4e5524f072095766ec6598165f530443835bc711 /libavformat/avidec.c
parent4383e1b23926cfd8727d0b66a54fa748ad051d32 (diff)
downloadffmpeg-231b3317184790b6be4b4619d96fd328f13aeabb.tar.gz
Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2066c18f65..b80effc33c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -713,7 +713,9 @@ static int avi_read_header(AVFormatContext *s)
}
break;
case MKTAG('s', 't', 'r', 'd'):
- if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) {
+ if (stream_index >= (unsigned)s->nb_streams
+ || s->streams[stream_index]->codec->extradata_size
+ || s->streams[stream_index]->codec->codec_tag == MKTAG('H','2','6','4')) {
avio_skip(pb, size);
} else {
uint64_t cur_pos = avio_tell(pb);