From 38d553322891c8e47182f05199d19888422167dc Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 1 Feb 2012 15:32:21 +0100 Subject: pixdesc: mark pseudopaletted formats with a special flag. This makes it possible to dintinguish them from PAL8. Fixes an invalid write in avpicture_layout(). --- libavcodec/rawdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/rawdec.c') diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 427d109a2b..bb93129027 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -158,8 +158,7 @@ static int raw_decode(AVCodecContext *avctx, avpicture_fill(picture, buf, avctx->pix_fmt, avctx->width, avctx->height); if((avctx->pix_fmt==PIX_FMT_PAL8 && buf_size < context->length) || - (avctx->pix_fmt!=PIX_FMT_PAL8 && - (av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PAL))){ + (av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PSEUDOPAL)) { frame->data[1]= context->palette; } if (avctx->pix_fmt == PIX_FMT_PAL8) { -- cgit v1.2.3