fix: stack overflow

Signed-off-by: gnattu <gnattuoc@me.com>
pull/11014/head
gnattu 11 months ago
parent ec896a901c
commit a30dc81b28

@ -6094,7 +6094,9 @@ namespace MediaBrowser.Controller.MediaEncoding
// Hardware surface only make sense when interop with OpenCL // Hardware surface only make sense when interop with OpenCL
// VideoToolbox's Hardware surface in ffmpeg is not only slower than hwupload, but also breaks HDR in many cases. // VideoToolbox's Hardware surface in ffmpeg is not only slower than hwupload, but also breaks HDR in many cases.
// For example: https://trac.ffmpeg.org/ticket/10884 // For example: https://trac.ffmpeg.org/ticket/10884
var useOclToneMapping = !IsVideoToolboxTonemapAvailable(state, options) && IsHwTonemapAvailable(state, options); var useOclToneMapping = !IsVideoToolboxTonemapAvailable(state, options) &&
options.EnableTonemapping &&
state.VideoStream.VideoRangeType == VideoRangeType.DOVI;
var useHwSurface = useOclToneMapping && IsVideoToolBoxFullSupported() && _mediaEncoder.SupportsFilter("alphasrc"); var useHwSurface = useOclToneMapping && IsVideoToolBoxFullSupported() && _mediaEncoder.SupportsFilter("alphasrc");
if (is8bitSwFormatsVt) if (is8bitSwFormatsVt)

@ -28,6 +28,7 @@ public class EncodingOptions
VaapiDevice = "/dev/dri/renderD128"; VaapiDevice = "/dev/dri/renderD128";
EnableTonemapping = false; EnableTonemapping = false;
EnableVppTonemapping = false; EnableVppTonemapping = false;
EnableVideoToolboxTonemapping = false;
TonemappingAlgorithm = "bt2390"; TonemappingAlgorithm = "bt2390";
TonemappingMode = "auto"; TonemappingMode = "auto";
TonemappingRange = "auto"; TonemappingRange = "auto";

Loading…
Cancel
Save