summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-02-01 15:32:21 +0100
committerAnton Khirnov <anton@khirnov.net>2012-02-08 21:01:31 +0100
commit38d553322891c8e47182f05199d19888422167dc (patch)
treec65ae36daf4d68dfdbea62accc7f33630cc338f5 /libavcodec/rawdec.c
parent8e37038a3458e6b55c9ebc28f077e2119a41b59e (diff)
pixdesc: mark pseudopaletted formats with a special flag.
This makes it possible to dintinguish them from PAL8. Fixes an invalid write in avpicture_layout().
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c3
1 files changed, 1 insertions, 2 deletions
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) {