From 64e5e14a323c402da5791e8e3fd056138d1c9028 Mon Sep 17 00:00:00 2001 From: ernestcao Date: Tue, 16 Jul 2024 17:35:45 +0800 Subject: [PATCH] fix: set default color range for VideoReformatter.format() --- 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 11ee1bf74..f41094eda 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 0) - cdef int c_dst_color_range = (ColorRange[dst_color_range].value if dst_color_range is not None else 0) + 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) return self._reformat( frame,