avfilter/vf_paletteuse: Forward error codes
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 27 Jan 2020 07:40:08 +0000 (08:40 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 24 Mar 2020 19:14:08 +0000 (20:14 +0100)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/vf_paletteuse.c

index 3013bd5..b32ff81 100644 (file)
@@ -912,12 +912,12 @@ static int apply_palette(AVFilterLink *inlink, AVFrame *in, AVFrame **outf)
                           s->last_out, out, &x, &y, &w, &h);
     av_frame_unref(s->last_in);
     av_frame_unref(s->last_out);
-    if (av_frame_ref(s->last_in, in) < 0 ||
-        av_frame_ref(s->last_out, out) < 0 ||
-        av_frame_make_writable(s->last_in) < 0) {
+    if ((ret = av_frame_ref(s->last_in, in))       < 0 ||
+        (ret = av_frame_ref(s->last_out, out))     < 0 ||
+        (ret = av_frame_make_writable(s->last_in)) < 0) {
         av_frame_free(&out);
         *outf = NULL;
-        return AVERROR(ENOMEM);
+        return ret;
     }
 
     ff_dlog(ctx, "%dx%d rect: (%d;%d) -> (%d,%d) [area:%dx%d]\n",