Skip to content

Commit c09820d

Browse files
committed
Fix sws_scale const correctness for strict GCC
1 parent 7fc0b94 commit c09820d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

av/video/reformatter.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ cdef class VideoReformatter:
157157
# We want to change the colorspace/color_range transforms.
158158
# We do that by grabbing all of the current settings, changing a
159159
# couple, and setting them all. We need a lot of state here.
160-
cdef const int *inv_tbl
161-
cdef const int *tbl
160+
cdef int *inv_tbl
161+
cdef int *tbl
162162
cdef int src_colorspace_range, dst_colorspace_range
163163
cdef int brightness, contrast, saturation
164164
cdef int ret
@@ -209,7 +209,7 @@ cdef class VideoReformatter:
209209
with nogil:
210210
lib.sws_scale(
211211
self.ptr,
212-
frame.ptr.data,
212+
<const uint8_t *const *>frame.ptr.data,
213213
frame.ptr.linesize,
214214
0, # slice Y
215215
frame.ptr.height,

include/libswscale/swscale.pxd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ cdef extern from "libswscale/swscale.h" nogil:
4949

5050
cdef int sws_scale(
5151
SwsContext *ctx,
52-
unsigned char **src_slice,
53-
int *src_stride,
52+
const unsigned char *const *src_slice,
53+
const int *src_stride,
5454
int src_slice_y,
5555
int src_slice_h,
56-
unsigned char **dst_slice,
56+
unsigned char *const *dst_slice,
5757
int *dst_stride,
5858
)
5959

0 commit comments

Comments
 (0)