diff mbox series

[FFmpeg-devel,2/9] avcodec/zmbvenc: Remove redundant pixel format check

Message ID AM7PR03MB66605166E56488D442D6E05C8FA89@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit d619e82e973c40137a56fa4ba720382b1f688a43
Headers show
Series [FFmpeg-devel,1/9] avcodec/magicyuvenc: Use immediate when known | 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

Andreas Rheinhardt Sept. 28, 2021, 2:41 p.m. UTC
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/zmbvenc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tomas Härdin Sept. 29, 2021, 1:57 p.m. UTC | #1
tis 2021-09-28 klockan 16:41 +0200 skrev Andreas Rheinhardt:
> ff_encode_preinit() already checked the pixel format via
> AVCodec.pix_fmts.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/zmbvenc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
> index b431476241..8efdbc963e 100644
> --- a/libavcodec/zmbvenc.c
> +++ b/libavcodec/zmbvenc.c
> @@ -347,9 +347,6 @@ static av_cold int encode_init(AVCodecContext
> *avctx)
>          c->fmt = ZMBV_FMT_32BPP;
>          c->bypp = 4;
>          break;
> -    default:
> -        av_log(avctx, AV_LOG_INFO, "unsupported pixel format\n");
> -        return AVERROR(EINVAL);

Sounds OK

/Tomas
diff mbox series

Patch

diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index b431476241..8efdbc963e 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -347,9 +347,6 @@  static av_cold int encode_init(AVCodecContext *avctx)
         c->fmt = ZMBV_FMT_32BPP;
         c->bypp = 4;
         break;
-    default:
-        av_log(avctx, AV_LOG_INFO, "unsupported pixel format\n");
-        return AVERROR(EINVAL);
     }
 
     /* Entropy-based score tables for comparing blocks.