]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: fix timestamp offset ticks logic
authorTimo Rothenpieler <timo@rothenpieler.org>
Sat, 9 Jan 2021 15:34:59 +0000 (16:34 +0100)
committerTimo Rothenpieler <timo@rothenpieler.org>
Sat, 9 Jan 2021 15:34:59 +0000 (16:34 +0100)
libavcodec/nvenc.c

index 1c06b6af2706779db71256a7391c4a065e970b6d..0830db714c32149147233f4ecfa16975543577f9 100644 (file)
@@ -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) * FFMIN(avctx->ticks_per_frame, 1);
+    pkt->dts -= FFMAX(avctx->max_b_frames, 0) * FFMAX(avctx->ticks_per_frame, 1);
 
     return 0;
 }