Skip to content

Commit d66859c

Browse files
committed
Make casting consistent
1 parent 02ce7b4 commit d66859c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

av/video/reformatter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,17 @@ def reformat(
214214
dst_color_primaries, ColorPrimaries, 0
215215
)
216216
c_threads: cython.int = threads if threads is not None else 0
217+
c_width: cython.int = width if width is not None else frame.ptr.width
218+
c_height: cython.int = height if height is not None else frame.ptr.height
217219

218220
# Track whether user explicitly specified destination metadata
219221
set_dst_color_trc: cython.bint = dst_color_trc is not None
220222
set_dst_color_primaries: cython.bint = dst_color_primaries is not None
221223

222224
return self._reformat(
223225
frame,
224-
width if width is not None else frame.ptr.width,
225-
height if height is not None else frame.ptr.height,
226+
c_width,
227+
c_height,
226228
c_dst_format,
227229
c_src_colorspace,
228230
c_dst_colorspace,

0 commit comments

Comments
 (0)