diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-02-01 18:32:21 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-02-09 00:01:31 +0400 |
commit | 38d553322891c8e47182f05199d19888422167dc (patch) | |
tree | c65ae36daf4d68dfdbea62accc7f33630cc338f5 /libavfilter/vf_crop.c | |
parent | 8e37038a3458e6b55c9ebc28f077e2119a41b59e (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 'libavfilter/vf_crop.c')
-rw-r--r-- | libavfilter/vf_crop.c | 3 |
1 files changed, 2 insertions, 1 deletions
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]; |