Skip to content

Commit 7f0fe24

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

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

av/video/reformatter.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)