diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-02-25 17:16:39 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-26 00:04:32 -0500 |
commit | 126daeb5507425d5e9906731d70015d79045d131 (patch) | |
tree | 05128af95a4ffd0f5d642abcc45cf41d77340ac4 /libavcodec/cdxl.c | |
parent | 0a9efe4c6eb48bf863e2e630b3ad907a198961c5 (diff) | |
download | ffmpeg-126daeb5507425d5e9906731d70015d79045d131.tar.gz |
cdxl: set pix_fmt PAL8 only if palette is available
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavcodec/cdxl.c')
-rw-r--r-- | libavcodec/cdxl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 01ebbccc19..e23b93421a 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -213,7 +213,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, if (c->video_size < FFALIGN(avctx->width, 16) * avctx->height * c->bpp / 8) return AVERROR_INVALIDDATA; - if (encoding == 0) { + if (!encoding && c->palette_size && c->bpp <= 8) { avctx->pix_fmt = PIX_FMT_PAL8; } else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8)) { if (c->palette_size != (1 << (c->bpp - 1))) |