diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-01-04 18:57:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-04 18:57:16 +0000 |
commit | e27bf2c70cb41ae12bd882fa3bc4ccac3ca5edf7 (patch) | |
tree | 0dd7da30d3b234262a3ba64dce19606c196a6214 /libavcodec/mpegvideo_enc.c | |
parent | bd7d9e45a44480da09e956b55e93f455cf1ed26c (diff) | |
download | ffmpeg-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.c | 6 |
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)){ |