[FFmpeg-cvslog] avformat/utils: fix duration_fields calculation when need_parsing=0

Michael Niedermayer git at videolan.org
Sun Sep 1 01:35:26 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep  1 00:46:14 2013 +0200| [03882030982c10a2afcf9851405c6732d75f404d] | committer: Michael Niedermayer

avformat/utils: fix duration_fields calculation when need_parsing=0

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03882030982c10a2afcf9851405c6732d75f404d
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4dd9bb7..16741d8 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2858,7 +2858,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
             }
             if (pkt->duration) {
                 st->info->codec_info_duration        += pkt->duration;
-                st->info->codec_info_duration_fields += st->parser && st->codec->ticks_per_frame==2 ? st->parser->repeat_pict + 1 : 2;
+                st->info->codec_info_duration_fields += st->parser && st->need_parsing && st->codec->ticks_per_frame==2 ? st->parser->repeat_pict + 1 : 2;
             }
         }
 #if FF_API_R_FRAME_RATE



More information about the ffmpeg-cvslog mailing list