aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-01-04 18:57:16 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-04 18:57:16 +0000
commite27bf2c70cb41ae12bd882fa3bc4ccac3ca5edf7 (patch)
tree0dd7da30d3b234262a3ba64dce19606c196a6214 /libavcodec/mpegvideo_enc.c
parentbd7d9e45a44480da09e956b55e93f455cf1ed26c (diff)
downloadffmpeg-e27bf2c70cb41ae12bd882fa3bc4ccac3ca5edf7.tar.gz
Fix YUV444P LJPEG encoding.
Originally committed as revision 26215 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 459ede7835..440588b3f2 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -252,6 +252,12 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
}
break;
case CODEC_ID_LJPEG:
+ if(avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_YUVJ444P && avctx->pix_fmt != PIX_FMT_RGB32 &&
+ ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P && avctx->pix_fmt != PIX_FMT_YUV444P) || avctx->strict_std_compliance>FF_COMPLIANCE_UNOFFICIAL)){
+ av_log(avctx, AV_LOG_ERROR, "colorspace not supported in LJPEG\n");
+ return -1;
+ }
+ break;
case CODEC_ID_MJPEG:
if(avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_RGB32 &&
((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P) || avctx->strict_std_compliance>FF_COMPLIANCE_UNOFFICIAL)){