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(). --- libswscale/swscale_internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 0f5404e154..bc36826ea2 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -627,7 +627,9 @@ const char *sws_format_name(enum PixelFormat format); (av_pix_fmt_descriptors[x].nb_components >= 2 && \ (av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) -#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_Y400A) +#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || \ + (av_pix_fmt_descriptors[x].flags & PIX_FMT_PSEUDOPAL) || \ + (x) == PIX_FMT_Y400A) extern const uint64_t ff_dither4[2]; extern const uint64_t ff_dither8[2]; -- cgit v1.2.3