diff mbox series

[FFmpeg-devel,1/3] api/api-band-test: Remove write-only variable

Message ID AS8P250MB0744C40BCF65317B6E0D3BC48FC52@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,1/3] api/api-band-test: Remove write-only variable | expand

Checks

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

Commit Message

Andreas Rheinhardt June 9, 2024, 1:44 a.m. UTC
Besides being write only it had the wrong type:
An uint8_t is definitely not enough to store the size
of these buffers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/api/api-band-test.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Andreas Rheinhardt June 11, 2024, 10:23 a.m. UTC | #1
Andreas Rheinhardt:
> Besides being write only it had the wrong type:
> An uint8_t is definitely not enough to store the size
> of these buffers.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  tests/api/api-band-test.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/tests/api/api-band-test.c b/tests/api/api-band-test.c
> index bbaa6edb58..d40e31b850 100644
> --- a/tests/api/api-band-test.c
> +++ b/tests/api/api-band-test.c
> @@ -31,7 +31,6 @@
>  #include "libavutil/imgutils.h"
>  
>  uint8_t *slice_byte_buffer;
> -uint8_t slice_byte_buffer_size;
>  int draw_horiz_band_called;
>  
>  static void draw_horiz_band(AVCodecContext *ctx, const AVFrame *fr, int offset[4],
> @@ -158,7 +157,6 @@ static int video_decode(const char *input_filename)
>          return AVERROR(ENOMEM);
>      }
>      memset(slice_byte_buffer, 0, byte_buffer_size);
> -    slice_byte_buffer_size = byte_buffer_size;
>  
>      result = 0;
>      while (result >= 0) {

Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/tests/api/api-band-test.c b/tests/api/api-band-test.c
index bbaa6edb58..d40e31b850 100644
--- a/tests/api/api-band-test.c
+++ b/tests/api/api-band-test.c
@@ -31,7 +31,6 @@ 
 #include "libavutil/imgutils.h"
 
 uint8_t *slice_byte_buffer;
-uint8_t slice_byte_buffer_size;
 int draw_horiz_band_called;
 
 static void draw_horiz_band(AVCodecContext *ctx, const AVFrame *fr, int offset[4],
@@ -158,7 +157,6 @@  static int video_decode(const char *input_filename)
         return AVERROR(ENOMEM);
     }
     memset(slice_byte_buffer, 0, byte_buffer_size);
-    slice_byte_buffer_size = byte_buffer_size;
 
     result = 0;
     while (result >= 0) {