diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-11-09 21:00:38 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-11-09 21:00:38 +0000 |
commit | 5c3c0e3f2e2a1393bcc03967e005aa2d03b0cdd9 (patch) | |
tree | f106081974ea747807fa38b6045453d253e415be /libavfilter | |
parent | dd18b301f4c8df38bb6e6f279d732927df8eef5f (diff) | |
download | ffmpeg-5c3c0e3f2e2a1393bcc03967e005aa2d03b0cdd9.tar.gz |
Fix crop filter start_frame() for paletted formats different from
PAL8. Shift data[1] only if the input format is not paletted.
Originally committed as revision 20488 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_crop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 0ff5f76c6d..a47c8ebf35 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -176,7 +176,11 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) ref2->data[0] += crop->y * ref2->linesize[0]; ref2->data[0] += (crop->x * crop->bpp) >> 3; - if (link->format != PIX_FMT_PAL8) { + if (link->format != PIX_FMT_PAL8 && + link->format != PIX_FMT_BGR4_BYTE && + link->format != PIX_FMT_RGB4_BYTE && + link->format != PIX_FMT_BGR8 && + link->format != PIX_FMT_RGB8) { for (i = 1; i < 3; i ++) { if (ref2->data[i]) { ref2->data[i] += (crop->y >> crop->vsub) * ref2->linesize[i]; |