Skip to content

Commit 3dec0b8

Browse files
committed
Fix remaining MSVC warnings
1 parent acde0d3 commit 3dec0b8

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

av/container/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def add_attachment(self, name: str, mimetype: str, data: bytes):
383383
buf[i] = data[i]
384384
buf[payload_size] = 0
385385
stream.codecpar.extradata = cython.cast(cython.p_uchar, buf)
386-
stream.codecpar.extradata_size = payload_size
386+
stream.codecpar.extradata_size = cython.cast(cython.int, payload_size)
387387

388388
# Wrap as user-land stream.
389389
meta_ptr = cython.address(stream.metadata)

av/sidedata/sidedata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self, frame: Frame):
109109
self._by_index: list = []
110110
self._by_type: dict = {}
111111

112-
i: cython.Py_ssize_t
112+
i: cython.int
113113
data: SideData
114114

115115
for i in range(self.frame.ptr.nb_side_data):

av/subtitles/codeccontext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def subtitle_header(self, data: bytes | None) -> None:
4444
if not self.ptr.subtitle_header:
4545
raise MemoryError("Cannot allocate subtitle_header")
4646
memcpy(self.ptr.subtitle_header, source.ptr, source.length)
47-
self.ptr.subtitle_header_size = source.length
47+
self.ptr.subtitle_header_size = cython.cast(cython.int, source.length)
4848
self.subtitle_header_set = True
4949

5050
def __dealloc__(self) -> None:

av/video/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def chroma_height(self, luma_height: cython.int = 0):
143143
@cython.final
144144
@cython.cclass
145145
class VideoFormatComponent:
146-
def __cinit__(self, format: VideoFormat, index: cython.size_t):
146+
def __cinit__(self, format: VideoFormat, index: cython.uint):
147147
self.format = format
148148
self.index = index
149149
self.ptr = cython.address(format.ptr.comp[index])

include/avcodec.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ cdef extern from "libavcodec/avcodec.h" nogil:
338338
cdef struct AVFrameSideData:
339339
AVFrameSideDataType type
340340
uint8_t *data
341-
int size
341+
size_t size
342342
AVDictionary *metadata
343343

344344
# See: http://ffmpeg.org/doxygen/trunk/structAVFrame.html

include/avformat.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ cdef extern from "libavformat/avformat.h" nogil:
154154
char filename
155155
int64_t start_time
156156
int64_t duration
157-
int bit_rate
157+
int64_t bit_rate
158158
int flags
159159
AVCodecID audio_codec_id
160160
AVCodecID video_codec_id

0 commit comments

Comments
 (0)