diff --git a/debian/patches/0005-lavfi-fix-framesync-with-embedded-PGS-subtitle.patch b/debian/patches/0005-lavfi-fix-framesync-with-embedded-PGS-subtitle.patch new file mode 100644 index 000000000..f12b17e19 --- /dev/null +++ b/debian/patches/0005-lavfi-fix-framesync-with-embedded-PGS-subtitle.patch @@ -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); diff --git a/debian/patches/series b/debian/patches/series index 7b6c31c78..ae537e9b9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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