diff options
| author | gnattu <gnattuoc@me.com> | 2024-02-29 09:03:00 +0800 |
|---|---|---|
| committer | gnattu <gnattuoc@me.com> | 2024-02-29 09:03:00 +0800 |
| commit | a30dc81b28aae64ca4e28930819bc0c4f682c7b3 (patch) | |
| tree | 35cf9ea0a25c577f8402465f86f2c3b1b3c704c6 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | ec896a901c269ad4cebc2705f64339bbf0c19bf7 (diff) | |
fix: stack overflow
Signed-off-by: gnattu <gnattuoc@me.com>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 202cfd5b7..0fc27f9f7 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -6094,7 +6094,9 @@ namespace MediaBrowser.Controller.MediaEncoding // 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. // 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"); if (is8bitSwFormatsVt) |
