aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-01 00:46:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-01 00:46:14 +0200
commit03882030982c10a2afcf9851405c6732d75f404d (patch)
tree2f28a08c802400072a1b4f1ae7b30c67870f41ea /libavformat
parent8349be852be7f68fe0590584fd46c4d5f1c16b3d (diff)
downloadffmpeg-03882030982c10a2afcf9851405c6732d75f404d.tar.gz
avformat/utils: fix duration_fields calculation when need_parsing=0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4dd9bb7469..16741d8919 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