[FFmpeg-cvslog] avfilter/zscale: fix segfault on library error

dxfhgwet git at videolan.org
Sat Oct 28 20:36:03 EEST 2017


ffmpeg | branch: master | dxfhgwet <noreply at example.com> | Sat Oct 28 10:20:22 2017 -0700| [b43d13144bdb63704dd55533b3fba9be376164ce] | committer: Paul B Mahol

avfilter/zscale: fix segfault on library error

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b43d13144bdb63704dd55533b3fba9be376164ce
---

 libavfilter/vf_zscale.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index c303dd4d63..5ee272ed1d 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -321,7 +321,7 @@ static int print_zimg_error(AVFilterContext *ctx)
 
     av_log(ctx, AV_LOG_ERROR, "code %d: %s\n", err_code, err_msg);
 
-    return err_code;
+    return AVERROR_EXTERNAL;
 }
 
 static int convert_chroma_location(enum AVChromaLocation chroma_location)
@@ -624,7 +624,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 
     ret = zimg_filter_graph_process(s->graph, &src_buf, &dst_buf, s->tmp, 0, 0, 0, 0);
     if (ret) {
-        print_zimg_error(link->dst);
+        ret = print_zimg_error(link->dst);
         goto fail;
     }
 
@@ -639,7 +639,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 
         ret = zimg_filter_graph_process(s->alpha_graph, &src_buf, &dst_buf, s->tmp, 0, 0, 0, 0);
         if (ret) {
-            print_zimg_error(link->dst);
+            ret = print_zimg_error(link->dst);
             goto fail;
         }
     } else if (odesc->flags & AV_PIX_FMT_FLAG_ALPHA) {



More information about the ffmpeg-cvslog mailing list