fix the framesync issue in overlay_cuda

This commit is contained in:
nyanmisaka
2021-04-03 14:47:23 +08:00
parent 32de646411
commit ee5ef38e90
2 changed files with 34 additions and 0 deletions
@@ -0,0 +1,33 @@
avfilter/hwupload_cuda: add YUVA420P format support
avfilter/overlay_cuda: fix framesync with embedded PGS subtitle
Index: jellyfin-ffmpeg/libavfilter/vf_hwupload_cuda.c
===================================================================
--- jellyfin-ffmpeg.orig/libavfilter/vf_hwupload_cuda.c
+++ jellyfin-ffmpeg/libavfilter/vf_hwupload_cuda.c
@@ -57,7 +57,7 @@ static int cudaupload_query_formats(AVFi
int ret;
static const enum AVPixelFormat input_pix_fmts[] = {
- AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P,
+ AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUV444P,
AV_PIX_FMT_P010, AV_PIX_FMT_P016, AV_PIX_FMT_YUV444P16,
AV_PIX_FMT_0RGB32, AV_PIX_FMT_0BGR32,
#if CONFIG_VULKAN
Index: jellyfin-ffmpeg/libavfilter/vf_overlay_cuda.c
===================================================================
--- jellyfin-ffmpeg.orig/libavfilter/vf_overlay_cuda.c
+++ jellyfin-ffmpeg/libavfilter/vf_overlay_cuda.c
@@ -157,9 +157,12 @@ static int overlay_cuda_blend(FFFrameSyn
if (ret < 0)
return ret;
- if (!input_main || !input_overlay)
+ if (!input_main)
return AVERROR_BUG;
+ if (!input_overlay)
+ return ff_filter_frame(outlink, input_main);
+
ret = av_frame_make_writable(input_main);
if (ret < 0) {
av_frame_free(&input_main);
+1
View File
@@ -2,3 +2,4 @@
0002-lavfi-add-a-filter-for-uploading-normal-frames-to-VAAPI.patch
0003-fix-for-the-broken-tonemap_vaapi-filter.patch
0004-cuda-format-converter-impl.patch
0005-lavfi-fix-framesync-with-embedded-PGS-subtitle.patch