[FFmpeg-cvslog] Do not read strd chunk in avi files as H264 extradata.
Carl Eugen Hoyos
git at videolan.org
Mon May 13 16:04:17 CEST 2013
ffmpeg | branch: release/1.2 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon May 13 12:39:44 2013 +0200| [79a3f364dd35dfe07f03f2b2b1a737d07046e864] | committer: Carl Eugen Hoyos
Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
(cherry picked from commit 231b3317184790b6be4b4619d96fd328f13aeabb)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79a3f364dd35dfe07f03f2b2b1a737d07046e864
---
libavformat/avidec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 00ac3de..18e2d96 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -706,7 +706,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);
More information about the ffmpeg-cvslog
mailing list