From 3f3ec4f9331d9e28572f2acb5d1024058ab384bd Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 2 May 2019 12:38:58 -0700 Subject: [PATCH] obs-ffmpeg: Fix jim-nvenc initial DTS for fractional FPS The initial DTS for non-fractional framerates was being incorrectly calculated. It assumed that the time base was in frames when it was not. Closes obsproject/obs-studio#1857 --- plugins/obs-ffmpeg/jim-nvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/obs-ffmpeg/jim-nvenc.c b/plugins/obs-ffmpeg/jim-nvenc.c index a239adba..6eae7f95 100644 --- a/plugins/obs-ffmpeg/jim-nvenc.c +++ b/plugins/obs-ffmpeg/jim-nvenc.c @@ -883,7 +883,7 @@ static bool nvenc_encode_tex(void *data, uint32_t handle, int64_t pts, /* subtract bframe delay from dts */ if (enc->bframes) - dts--; + dts -= packet->timebase_num; *received_packet = true; packet->data = enc->packet_data.array; -- GitLab