avformat/utils: fix duration_fields calculation when need_parsing=0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-01 00:46:14 +02:00
parent 8349be852b
commit 0388203098
1 changed files with 1 additions and 1 deletions

View File

@ -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