Browse code

lavf: fix invalid reads in avformat_find_stream_info()

(cherry picked from commit e358f7ee90fec591348ca05dff94ebaf4c1a098b)

Conflicts:

libavformat/utils.c

Signed-off-by: Anton Khirnov <anton@khirnov.net>

Anton Khirnov authored on 2011/07/14 10:08:53
Showing 1 changed files
... ...
@@ -2394,7 +2394,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
2394 2394
            it takes longer and uses more memory. For MPEG-4, we need to
2395 2395
            decompress for QuickTime. */
2396 2396
         if (!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st))
2397
-            try_decode_frame(st, pkt, (options && i <= orig_nb_streams )? &options[i] : NULL);
2397
+            try_decode_frame(st, pkt, (options && i < orig_nb_streams )? &options[i] : NULL);
2398 2398
 
2399 2399
         st->codec_info_nb_frames++;
2400 2400
         count++;