aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-13 02:54:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-13 11:30:48 +0200
commitdded4cb20b21d7c6fa0c96efa12f80aee9b463fb (patch)
tree19dc06f0c86ac850aed4c10f2ef7ffcfe7fecb66 /libavcodec/utils.c
parent465a72b4b4ad1366b47436506a1352ee0c0ef232 (diff)
downloadffmpeg-dded4cb20b21d7c6fa0c96efa12f80aee9b463fb.tar.gz
lavc: fix support of unofficial pix_fmt extensions of jpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d427a92c65..8ed78d6e70 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -883,7 +883,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
for (i = 0; avctx->codec->pix_fmts[i] != PIX_FMT_NONE; i++)
if (avctx->pix_fmt == avctx->codec->pix_fmts[i])
break;
- if (avctx->codec->pix_fmts[i] == PIX_FMT_NONE) {
+ if (avctx->codec->pix_fmts[i] == PIX_FMT_NONE
+ && !((avctx->codec_id == CODEC_ID_MJPEG || avctx->codec_id == CODEC_ID_LJPEG)
+ && avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) {
av_log(avctx, AV_LOG_ERROR, "Specified pix_fmt is not supported\n");
ret = AVERROR(EINVAL);
goto free_and_end;