Commit 03882030 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: fix duration_fields calculation when need_parsing=0

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8349be85
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment