浏览代码

obs-ffmpeg: Use correct function with older FFmpeg vers.

When this was being fixed up, the incorrect function name was used --
however it still compiled because the author was using the newer FFmpeg
version at the time.
jp9000 7 年之前
父节点
当前提交
530266917d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c

+ 1 - 1
plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c

@@ -245,7 +245,7 @@ static void nvenc_destroy(void *data)
 			if (avcodec_receive_packet(enc->context, &pkt) < 0)
 			if (avcodec_receive_packet(enc->context, &pkt) < 0)
 				break;
 				break;
 #else
 #else
-			if (avcodec_receive_packet(enc->context, &pkt, NULL,
+			if (avcodec_encode_video2(enc->context, &pkt, NULL,
 						&r_pkt) < 0)
 						&r_pkt) < 0)
 				break;
 				break;
 #endif
 #endif