diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-02 22:13:40 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-09 10:25:19 +0400 |
commit | cd99146253cf9de5dad5694b97027d5612fdc61d (patch) | |
tree | 0b53395aa59459574c2e5fa1c277b4267e01c4a0 /libavfilter/af_join.c | |
parent | 8d18bc550e7dfc62bc872507a02ae2d7827882d6 (diff) |
lavfi: add error handling to filter_samples().
Diffstat (limited to 'libavfilter/af_join.c')
-rw-r--r-- | libavfilter/af_join.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index e86c556f5b..9ed11a9991 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -92,7 +92,7 @@ static const AVClass join_class = { .version = LIBAVUTIL_VERSION_INT, }; -static void filter_samples(AVFilterLink *link, AVFilterBufferRef *buf) +static int filter_samples(AVFilterLink *link, AVFilterBufferRef *buf) { AVFilterContext *ctx = link->dst; JoinContext *s = ctx->priv; @@ -104,6 +104,8 @@ static void filter_samples(AVFilterLink *link, AVFilterBufferRef *buf) av_assert0(i < ctx->nb_inputs); av_assert0(!s->input_frames[i]); s->input_frames[i] = buf; + + return 0; } static int parse_maps(AVFilterContext *ctx) @@ -468,11 +470,11 @@ static int join_request_frame(AVFilterLink *outlink) priv->nb_in_buffers = ctx->nb_inputs; buf->buf->priv = priv; - ff_filter_samples(outlink, buf); + ret = ff_filter_samples(outlink, buf); memset(s->input_frames, 0, sizeof(*s->input_frames) * ctx->nb_inputs); - return 0; + return ret; fail: avfilter_unref_buffer(buf); |