]> git.sesse.net Git - ffmpeg/commitdiff
Fixes NULL pointer dereference CID66
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 28 May 2008 00:10:34 +0000 (00:10 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 28 May 2008 00:10:34 +0000 (00:10 +0000)
Originally committed as revision 13483 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avidec.c

index a84acf8e2835da1476d9f2e9ce8c1f8dc1b00456..06576c313ce009cd480cd31882f1ac380d059428 100644 (file)
@@ -650,6 +650,9 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
                 best_stream_index= i;
             }
         }
+        if(!best_st)
+            return -1;
+
         best_ast = best_st->priv_data;
         best_ts= av_rescale(best_ts, best_st->time_base.den, AV_TIME_BASE * (int64_t)best_st->time_base.num); //FIXME a little ugly
         if(best_ast->remaining)