diff mbox series

[FFmpeg-devel,5/9] avcodec/magicyuvenc: Remove redundant pixel format check

Message ID AM7PR03MB666035D7DA55C67F7E51F0C88FA89@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 39d28ea4d5bac9bb688e482990c8979ef9df954c
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/magicyuvenc.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/magicyuvenc.c b/libavcodec/magicyuvenc.c
index 7ab5e61ffe..ab32d4cee3 100644
--- a/libavcodec/magicyuvenc.c
+++ b/libavcodec/magicyuvenc.c
@@ -189,10 +189,6 @@  static av_cold int magy_encode_init(AVCodecContext *avctx)
         avctx->codec_tag = MKTAG('M', '8', 'G', '0');
         s->format = 0x6b;
         break;
-    default:
-        av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format: %d\n",
-               avctx->pix_fmt);
-        return AVERROR_INVALIDDATA;
     }
 
     ff_llvidencdsp_init(&s->llvidencdsp);