Skip to content

Commit

Permalink
Fix #1378
Browse files Browse the repository at this point in the history
Use 0 (unknown color range) if the given a None value instead of
copying the input frame.
  • Loading branch information
WyattBlue committed May 14, 2024
1 parent f42cc88 commit b8dc8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions av/video/reformatter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b8dc8b9

Please sign in to comment.