diff mbox series

[FFmpeg-devel,v3,6/8] avpriv_find_start_code(): correct type of start_code parameter

Message ID 20220209032854.565698-7-scott.the.elm@gmail.com
State New
Headers show
Series rewrite avpriv_find_start_code() for clarity | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Scott Theisen Feb. 9, 2022, 3:28 a.m. UTC
---
 libavcodec/mpeg12dec.c   | 2 +-
 libavformat/rtpenc_mpv.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 27fd61e848..24cd6aac77 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1768,7 +1768,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 8b6987b7f2..9c0816ef95 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 (start_code_is_valid(start_code)) {
                     /* New start code found */