This field contains the number of _field_ durations by which the standard frame duration should be extended.
Unified · Split
| @@ -990,10 +990,10 @@ static int64_t video_duration_estimate(const InputStream *ist, const AVFrame *fr · 989 unmodified lines | |||
| 990 | return frame->duration; | 990 | return frame->duration; |
| 991 | 991 | ||
| 992 | if (ist->dec_ctx->framerate.den && ist->dec_ctx->framerate.num) { | 992 | if (ist->dec_ctx->framerate.den && ist->dec_ctx->framerate.num) { |
| 993 | int ticks = frame->repeat_pict >= 0 ? | 993 | int fields = frame->repeat_pict + 2; |
| 994 | frame->repeat_pict + 1 : | 994 | AVRational field_rate = av_mul_q(ist->dec_ctx->framerate, |
| 995 | ist->dec_ctx->ticks_per_frame; | 995 | (AVRational){ 2, 1 }); |
| 996 | codec_duration = av_rescale_q(ticks, av_inv_q(ist->dec_ctx->framerate), | 996 | codec_duration = av_rescale_q(fields, av_inv_q(field_rate), |
| 997 | ist->st->time_base); | 997 | ist->st->time_base); |
| 998 | } | 998 | } |
| 999 | 999 | ||