]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_crop.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavfilter / vf_crop.c
index b3a82aae800ac6a8496a5251d14de930ba3e3da8..117cd4397eb3afbab7d0593a4b02eea85b00633b 100644 (file)
@@ -32,7 +32,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/mathematics.h"
 
-static const char * const var_names[] = {
+static const char *const var_names[] = {
     "in_w", "iw",   ///< width  of the input video
     "in_h", "ih",   ///< height of the input video
     "out_w", "ow",  ///< width  of the cropped video
@@ -278,7 +278,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];