[FFmpeg-devel] [PATCH v2 06/13] avpriv_find_start_code(): correct type of start_code parameter
Scott Theisen
scott.the.elm at gmail.com
Thu Feb 3 20:44:43 EET 2022
---
libavcodec/mpeg12dec.c | 2 +-
libavformat/rtpenc_mpv.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 65b66d11f8..6b0b84ae64 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1770,7 +1770,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
if (avctx->hwaccel && avctx->hwaccel->decode_slice) {
const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */
- int start_code = -1;
+ uint32_t start_code = ~0;
buf_end = avpriv_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
if (buf_end < *buf + buf_size)
buf_end -= 4;
diff --git a/libavformat/rtpenc_mpv.c b/libavformat/rtpenc_mpv.c
index 05a77fa11c..91c07574bb 100644
--- a/libavformat/rtpenc_mpv.c
+++ b/libavformat/rtpenc_mpv.c
@@ -51,11 +51,10 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
end_of_slice = 1;
} else {
const uint8_t *r, *r1;
- int start_code;
r1 = buf1;
while (1) {
- start_code = -1;
+ uint32_t start_code = ~0;
r = avpriv_find_start_code(r1, end, &start_code);
if (avpriv_start_code_is_valid(start_code)) {
/* New start code found */
--
2.32.0
More information about the ffmpeg-devel
mailing list