avfilter/showpalette: fix leak in case of error
[ffmpeg.git] / libavfilter / vf_pp7.c
index ac0c117..0a70902 100644 (file)
@@ -278,6 +278,7 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUV410P,  AV_PIX_FMT_YUV440P,
         AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
         AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P,
+        AV_PIX_FMT_GBRP,
         AV_PIX_FMT_GRAY8,    AV_PIX_FMT_NONE
     };
     ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
@@ -346,6 +347,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
                 return AVERROR(ENOMEM);
             }
             av_frame_copy_props(out, in);
+            out->width = in->width;
+            out->height = in->height;
         }
 
         if (qp_table || pp7->qp) {