diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-12-31 04:56:44 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-12-31 04:56:44 +0000 |
commit | 32282b50eae0c2d762843b82c491ae66a2c909d3 (patch) | |
tree | eef6efbe0a28b63b58a2b5af1e4a81d8a00942f0 /libavcodec/lclenc.c | |
parent | 0790caba607c2bb952b405c4840529b82c7cc150 (diff) | |
download | ffmpeg-32282b50eae0c2d762843b82c491ae66a2c909d3.tar.gz |
Add .pix_fmts to LCL encoder
Now ffmpeg should automatically convert to BGR instead of erroring out.
Originally committed as revision 26178 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lclenc.c')
-rw-r--r-- | libavcodec/lclenc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index 8d7c5bf4e6..f50b5883b3 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -130,16 +130,8 @@ static av_cold int encode_init(AVCodecContext *avctx) // Will be user settable someday c->compression = 6; c->flags = 0; - - switch(avctx->pix_fmt){ - case PIX_FMT_BGR24: - c->imgtype = IMGTYPE_RGB24; - avctx->bits_per_coded_sample= 24; - break; - default: - av_log(avctx, AV_LOG_ERROR, "Input pixel format %s not supported\n", avcodec_get_pix_fmt_name(avctx->pix_fmt)); - return -1; - } + c->imgtype = IMGTYPE_RGB24; + avctx->bits_per_coded_sample= 24; avctx->extradata[0]= 4; avctx->extradata[1]= 0; @@ -186,5 +178,6 @@ AVCodec zlib_encoder = { encode_init, encode_frame, encode_end, + .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_BGR24, PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), }; |