diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-03-28 02:44:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-03-28 02:44:44 +0000 |
commit | 79d6b9cbd04dd9b562d34ab1aeb6f946822f8ce3 (patch) | |
tree | ea2750b5be1033c19b10f1d198c7b0bedf2d7313 /libavformat/avidec.c | |
parent | c1ac39b3df3e9cc86209b51df7cd32bd34d26d0b (diff) | |
download | ffmpeg-streaming-79d6b9cbd04dd9b562d34ab1aeb6f946822f8ce3.zip ffmpeg-streaming-79d6b9cbd04dd9b562d34ab1aeb6f946822f8ce3.tar.gz |
1000l to myself, dereferencing uninitalized pointer.
Originally committed as revision 12614 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index b45641e..c2c1587 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -778,17 +778,17 @@ resync: //parse ##dc/##wb if(n < s->nb_streams){ AVStream *st; - AVStream *st1 = s->streams[1]; - AVIStream *ast1= st1->priv_data; AVIStream *ast; st = s->streams[n]; ast = st->priv_data; + if(s->nb_streams>=2){ + AVStream *st1 = s->streams[1]; + AVIStream *ast1= st1->priv_data; //workaround for broken small-file-bug402.avi if( d[2] == 'w' && d[3] == 'b' && n==0 - && s->nb_streams>=2 && st ->codec->codec_type == CODEC_TYPE_VIDEO && st1->codec->codec_type == CODEC_TYPE_AUDIO && ast->prefix == 'd'*256+'c' @@ -799,6 +799,7 @@ resync: ast = ast1; av_log(s, AV_LOG_WARNING, "Invalid stream+prefix combination, assuming audio\n"); } + } if( (st->discard >= AVDISCARD_DEFAULT && size==0) |