diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-02 20:13:40 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-09 08:25:19 +0200 |
commit | cd99146253cf9de5dad5694b97027d5612fdc61d (patch) | |
tree | 0b53395aa59459574c2e5fa1c277b4267e01c4a0 /libavfilter/split.c | |
parent | 8d18bc550e7dfc62bc872507a02ae2d7827882d6 (diff) | |
download | ffmpeg-cd99146253cf9de5dad5694b97027d5612fdc61d.tar.gz |
lavfi: add error handling to filter_samples().
Diffstat (limited to 'libavfilter/split.c')
-rw-r--r-- | libavfilter/split.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libavfilter/split.c b/libavfilter/split.c index ae810e52c6..a3f6ef2337 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -110,15 +110,19 @@ AVFilter avfilter_vf_split = { .outputs = (AVFilterPad[]) {{ .name = NULL}}, }; -static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) +static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) { AVFilterContext *ctx = inlink->dst; - int i; + int i, ret = 0; - for (i = 0; i < ctx->nb_outputs; i++) - ff_filter_samples(inlink->dst->outputs[i], - avfilter_ref_buffer(samplesref, ~AV_PERM_WRITE)); + for (i = 0; i < ctx->nb_outputs; i++) { + ret = ff_filter_samples(inlink->dst->outputs[i], + avfilter_ref_buffer(samplesref, ~AV_PERM_WRITE)); + if (ret < 0) + break; + } avfilter_unref_buffer(samplesref); + return ret; } AVFilter avfilter_af_asplit = { |