changeset 1608:70ce246379b5 libavformat

ignore duration of the first 2 frames in the max-time break check fixes framerate detection for framerate_misdetected.wmv
author michael
date Fri, 29 Dec 2006 21:41:06 +0000
parents edb923014029
children 9adbec516265
files utils.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Fri Dec 29 21:16:21 2006 +0000
+++ b/utils.c	Fri Dec 29 21:41:06 2006 +0000
@@ -1880,7 +1880,8 @@
         read_size += pkt->size;
 
         st = ic->streams[pkt->stream_index];
-        st->codec_info_duration += pkt->duration;
+        if(st->codec_info_nb_frames>1) //FIXME move codec_info_nb_frames and codec_info_duration from AVStream into this func
+            st->codec_info_duration += pkt->duration;
         if (pkt->duration != 0)
             st->codec_info_nb_frames++;