Module: libav Branch: master Commit: 126daeb5507425d5e9906731d70015d79045d131
Author: Paul B Mahol <[email protected]> Committer: Justin Ruggles <[email protected]> Date: Sat Feb 25 17:16:39 2012 +0000 cdxl: set pix_fmt PAL8 only if palette is available Signed-off-by: Paul B Mahol <[email protected]> Signed-off-by: Justin Ruggles <[email protected]> --- libavcodec/cdxl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 01ebbcc..e23b934 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))) _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
