From a71c635cef740ddd67c60f086298157c172dd83d Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Tue, 14 May 2024 02:34:21 -0400 Subject: [PATCH] Fix #1378 Use 0 (unknown color range) if the given a None value instead of copying the input frame. --- av/video/reformatter.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/av/video/reformatter.pyx b/av/video/reformatter.pyx index f41094eda..11ee1bf74 100644 --- a/av/video/reformatter.pyx +++ b/av/video/reformatter.pyx @@ -87,8 +87,8 @@ cdef class VideoReformatter: cdef int c_src_colorspace = (Colorspace[src_colorspace].value if src_colorspace is not None else frame.colorspace) cdef int c_dst_colorspace = (Colorspace[dst_colorspace].value if dst_colorspace is not None else frame.colorspace) cdef int c_interpolation = (Interpolation[interpolation] if interpolation is not None else Interpolation.BILINEAR).value - cdef int c_src_color_range = (ColorRange[src_color_range].value if src_color_range is not None else frame.color_range) - cdef int c_dst_color_range = (ColorRange[dst_color_range].value if dst_color_range is not None else frame.color_range) + cdef int c_src_color_range = (ColorRange[src_color_range].value if src_color_range is not None else 0) + cdef int c_dst_color_range = (ColorRange[dst_color_range].value if dst_color_range is not None else 0) return self._reformat( frame,