diff options
author | dxfhgwet <noreply@example.com> | 2017-10-28 10:20:22 -0700 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-10-28 19:32:45 +0200 |
commit | b43d13144bdb63704dd55533b3fba9be376164ce (patch) | |
tree | 4147caaa5d2f24ee9382e0d9a97c72c7a12640ce /libavfilter/vf_zscale.c | |
parent | 4205e20c2222287b97932f8d6a8db8cb78d80b01 (diff) | |
download | ffmpeg-b43d13144bdb63704dd55533b3fba9be376164ce.tar.gz |
avfilter/zscale: fix segfault on library error
Diffstat (limited to 'libavfilter/vf_zscale.c')
-rw-r--r-- | libavfilter/vf_zscale.c | 6 |
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) { |