aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_zscale.c
diff options
context:
space:
mode:
authordxfhgwet <noreply@example.com>2017-10-28 10:20:22 -0700
committerPaul B Mahol <onemda@gmail.com>2017-10-28 19:32:45 +0200
commitb43d13144bdb63704dd55533b3fba9be376164ce (patch)
tree4147caaa5d2f24ee9382e0d9a97c72c7a12640ce /libavfilter/vf_zscale.c
parent4205e20c2222287b97932f8d6a8db8cb78d80b01 (diff)
downloadffmpeg-b43d13144bdb63704dd55533b3fba9be376164ce.tar.gz
avfilter/zscale: fix segfault on library error
Diffstat (limited to 'libavfilter/vf_zscale.c')
-rw-r--r--libavfilter/vf_zscale.c6
1 files 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) {