diff mbox series

[FFmpeg-devel] avcodec/vqavideo: Remove dead code

Message ID AM7PR03MB6660A33BBD8696DA68B6DE2D8F639@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 5593f5cf242a99495b6047e5c226bfe4b934342e
Headers show
Series [FFmpeg-devel] avcodec/vqavideo: Remove dead code
Related show

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

Andreas Rheinhardt Nov. 26, 2021, 7:23 p.m. UTC
Fixes Coverity issue #1493344.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vqavideo.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Andreas Rheinhardt Nov. 27, 2021, 5:30 p.m. UTC | #1
Andreas Rheinhardt:
> Fixes Coverity issue #1493344.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/vqavideo.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
> index 5466e25cdf..61f0a2c950 100644
> --- a/libavcodec/vqavideo.c
> +++ b/libavcodec/vqavideo.c
> @@ -692,11 +692,6 @@ static int vqa_decode_frame_hicolor(VqaContext *s, AVFrame *frame)
>          bytestream2_get_buffer(&s->gb, s->codebook, chunk_size);
>      }
>  
> -    if (vprz_chunk == -1 && vptr_chunk == -1) {
> -        av_log(s->avctx, AV_LOG_ERROR, "frame has no block data\n");
> -        return AVERROR_INVALIDDATA;
> -    }
> -
>      /* decode the frame */
>  
>      if (vptr_chunk != -1) {
> @@ -716,7 +711,7 @@ static int vqa_decode_frame_hicolor(VqaContext *s, AVFrame *frame)
>          if ((res = decode_format80(s, chunk_size, s->decode_buffer, s->decode_buffer_size, 0)) < 0)
>              return res;
>      } else {
> -        av_log(s->avctx, AV_LOG_ERROR, "expected either VPTR or VPRZ chunk\n");
> +        av_log(s->avctx, AV_LOG_ERROR, "frame has no block data\n");
>          return AVERROR_INVALIDDATA;
>      }
>  
> 
Will apply tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 5466e25cdf..61f0a2c950 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -692,11 +692,6 @@  static int vqa_decode_frame_hicolor(VqaContext *s, AVFrame *frame)
         bytestream2_get_buffer(&s->gb, s->codebook, chunk_size);
     }
 
-    if (vprz_chunk == -1 && vptr_chunk == -1) {
-        av_log(s->avctx, AV_LOG_ERROR, "frame has no block data\n");
-        return AVERROR_INVALIDDATA;
-    }
-
     /* decode the frame */
 
     if (vptr_chunk != -1) {
@@ -716,7 +711,7 @@  static int vqa_decode_frame_hicolor(VqaContext *s, AVFrame *frame)
         if ((res = decode_format80(s, chunk_size, s->decode_buffer, s->decode_buffer_size, 0)) < 0)
             return res;
     } else {
-        av_log(s->avctx, AV_LOG_ERROR, "expected either VPTR or VPRZ chunk\n");
+        av_log(s->avctx, AV_LOG_ERROR, "frame has no block data\n");
         return AVERROR_INVALIDDATA;
     }