Correcting wrong looking stream_id validity check in avidec.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Feb 2010 11:50:44 +0000 (11:50 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Feb 2010 11:50:44 +0000 (11:50 +0000)
Originally committed as revision 21642 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avidec.c

index 7a2ee05..a825733 100644 (file)
@@ -132,7 +132,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
         longs_pre_entry,index_type, entries_in_use, chunk_id, base);
 #endif
 
-    if(stream_id > s->nb_streams || stream_id < 0)
+    if(stream_id >= s->nb_streams || stream_id < 0)
         return -1;
     st= s->streams[stream_id];
     ast = st->priv_data;