summaryrefslogtreecommitdiff
path: root/libavcodec/encode.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-06 03:01:14 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-10 03:48:41 +0200
commit059fc2d9da5364627613fb3e6424079e14dbdfd3 (patch)
treeed91afb8711dd2a9f62327cdad8deda50b07f2f7 /libavcodec/encode.c
parent48cda7d02b768d965db6582271a2f8591f2a3a10 (diff)
avcodec/mjpegenc: Include all supported pix_fmts in mpegenc pix_fmts
Currently said list contains only the pixel formats that are always supported irrespective of the range and the value of strict_std_compliance. This makes the MJPEG encoder an outlier as all other codecs put all potentially supported pixel formats into said list and error out if the chosen pixel format is unsupported. This commit brings it therefore in line with the other encoders. The behaviour of fftools/ffmpeg_filter.c has been preserved. A more informed decision would be possible if colour range were available at this point, but it isn't. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r--libavcodec/encode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 89df5235da..9a4140f91a 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -564,9 +564,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
for (i = 0; avctx->codec->pix_fmts[i] != AV_PIX_FMT_NONE; i++)
if (avctx->pix_fmt == avctx->codec->pix_fmts[i])
break;
- if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE
- && !(avctx->codec_id == AV_CODEC_ID_MJPEG
- && avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) {
+ if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE) {
char buf[128];
snprintf(buf, sizeof(buf), "%d", avctx->pix_fmt);
av_log(avctx, AV_LOG_ERROR, "Specified pixel format %s is invalid or not supported\n",