summaryrefslogtreecommitdiff
path: root/libavcodec/jpeglsenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-12 19:02:58 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-13 02:44:48 +0200
commit33db0cbfd08384d611370006a77675cc6b778d12 (patch)
treee890cd0aacb666e6a86d49fc7941990f65de84ce /libavcodec/jpeglsenc.c
parentb972dab39d81d5f291cea4b9a042beb63386e768 (diff)
downloadffmpeg-33db0cbfd08384d611370006a77675cc6b778d12.tar.gz
avcodec/jpeglsenc: Remove redundant pixel format checks
This encoder has AVCodec.pix_fmts set, so ff_encode_preinit() already checks for this. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/jpeglsenc.c')
-rw-r--r--libavcodec/jpeglsenc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index 2bb6b1407a..d03ce32f41 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -429,14 +429,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- if (ctx->pix_fmt != AV_PIX_FMT_GRAY8 &&
- ctx->pix_fmt != AV_PIX_FMT_GRAY16 &&
- ctx->pix_fmt != AV_PIX_FMT_RGB24 &&
- ctx->pix_fmt != AV_PIX_FMT_BGR24) {
- av_log(ctx, AV_LOG_ERROR,
- "Only grayscale and RGB24/BGR24 images are supported\n");
- return -1;
- }
return 0;
}