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(). --- libavfilter/vf_crop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavfilter/vf_crop.c') diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 0880d4e5f9..cb01bd41cb 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -272,7 +272,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) ref2->data[0] += crop->y * ref2->linesize[0]; ref2->data[0] += crop->x * crop->max_step[0]; - if (!(av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL)) { + if (!(av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL || + av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PSEUDOPAL)) { for (i = 1; i < 3; i ++) { if (ref2->data[i]) { ref2->data[i] += (crop->y >> crop->vsub) * ref2->linesize[i]; -- cgit v1.2.3