Move AVStream->codec_info_nb_frames increment after try_decode_frame
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 3 Jul 2010 03:15:37 +0000 (03:15 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 3 Jul 2010 03:15:37 +0000 (03:15 +0000)
Originally committed as revision 24017 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index 050429118d5a7c14d8ff01ca26a219f4cd8cb41a..6fa4dff419637b0c33c9ea92fea1ddca916c3b58 100644 (file)
@@ -2281,8 +2281,6 @@ int av_find_stream_info(AVFormatContext *ic)
             }
             codec_info_duration[st->index] += pkt->duration;
         }
-            st->codec_info_nb_frames++;
-
         {
             int index= pkt->stream_index;
             int64_t last= last_dts[index];
@@ -2326,6 +2324,7 @@ int av_find_stream_info(AVFormatContext *ic)
         if (!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st))
             try_decode_frame(st, pkt);
 
+        st->codec_info_nb_frames++;
         count++;
     }