[FFmpeg-cvslog] avcodec/nvenc: fix timestamp offset ticks logic

Timo Rothenpieler git at videolan.org
Sat Jan 9 17:38:28 EET 2021


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sat Jan  9 16:34:59 2021 +0100| [7a2d94cf1ade02829b36f9ebc8d6bb2e6e126343] | committer: Timo Rothenpieler

avcodec/nvenc: fix timestamp offset ticks logic

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a2d94cf1ade02829b36f9ebc8d6bb2e6e126343
---

 libavcodec/nvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 1c06b6af27..0830db714c 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) * FFMIN(avctx->ticks_per_frame, 1);
+    pkt->dts -= FFMAX(avctx->max_b_frames, 0) * FFMAX(avctx->ticks_per_frame, 1);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list