Message ID | 20210312204202.19486-1-martin@martin.st |
---|---|
State | Accepted |
Commit | 30cd7feb2dd497b16edb6d7c09a83eb49f89645d |
Headers | show |
Series | [FFmpeg-devel] nvenc: Use frameIntervalP instead of max_b_frames for offsetting output dts | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
applied
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index a061dee880..fbf55ebc9d 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1921,7 +1921,7 @@ static int nvenc_set_timestamp(AVCodecContext *avctx, pkt->pts = params->outputTimeStamp; pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list); - pkt->dts -= FFMAX(avctx->max_b_frames, 0) * FFMAX(avctx->ticks_per_frame, 1); + pkt->dts -= FFMAX(ctx->encode_config.frameIntervalP - 1, 0) * FFMAX(avctx->ticks_per_frame, 1); return 0; }