ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Wed Feb 26 11:13:15 2025 +0100| [3defca7eae025b2566115192af2078e7e780f080] | 
committer: Andreas Rheinhardt

avcodec/rv34: Make ff_rv34_get_start_offset() honor its name

Up until now, it only returned the number of bits for the
start offset, but not the start offset; the GetBitContext
passed to it was unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3defca7eae025b2566115192af2078e7e780f080
---

 libavcodec/rv30.c | 4 +---
 libavcodec/rv34.c | 2 +-
 libavcodec/rv40.c | 4 +---
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 5e1dd01aa1..351276995b 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -38,7 +38,6 @@
 static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, 
SliceInfo *si)
 {
     AVCodecContext *avctx = r->s.avctx;
-    int mb_bits;
     int w = r->s.width, h = r->s.height;
     int mb_size;
     int rpr;
@@ -76,8 +75,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, 
GetBitContext *gb, SliceIn
     si->width  = w;
     si->height = h;
     mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
-    mb_bits = ff_rv34_get_start_offset(gb, mb_size);
-    si->start = get_bits(gb, mb_bits);
+    si->start = ff_rv34_get_start_offset(gb, mb_size);
     skip_bits1(gb);
     return 0;
 }
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index d8d307f969..ddc95c3a78 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -342,7 +342,7 @@ int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size)
     for(i = 0; i < 5; i++)
         if(rv34_mb_max_sizes[i] >= mb_size - 1)
             break;
-    return rv34_mb_bits_sizes[i];
+    return get_bits(gb, rv34_mb_bits_sizes[i]);
 }
 
 /**
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 0a5136d129..d28e02c2d1 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -131,7 +131,6 @@ static void rv40_parse_picture_size(GetBitContext *gb, int 
*w, int *h)
 
 static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, 
SliceInfo *si)
 {
-    int mb_bits;
     int w = r->s.width, h = r->s.height;
     int mb_size;
     int ret;
@@ -154,8 +153,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, 
GetBitContext *gb, SliceIn
     si->width  = w;
     si->height = h;
     mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
-    mb_bits = ff_rv34_get_start_offset(gb, mb_size);
-    si->start = get_bits(gb, mb_bits);
+    si->start = ff_rv34_get_start_offset(gb, mb_size);
 
     return 0;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to