Переглянути джерело

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
jp9000 6 роки тому
батько
коміт
3f3ec4f933
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      plugins/obs-ffmpeg/jim-nvenc.c

+ 1 - 1
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;