Commit aaadf0dc authored by Timo Rothenpieler's avatar Timo Rothenpieler

avcodec/nvenc: offset dts to account for b-frame reordering

Fixes ticket #7303
Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
parent d6957629
......@@ -1838,10 +1838,11 @@ static int nvenc_set_timestamp(AVCodecContext *avctx,
pkt->dts = ts0 - delta;
ctx->first_packet_output = 1;
return 0;
} else {
pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
}
pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
pkt->dts -= avctx->max_b_frames;
return 0;
}
......
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