Showing the changes to libavfilter/split.c (1 of 15 files). Show all
Unified · Split
| @@ -110,15 +110,19 @@ AVFilter avfilter_vf_split = { · 109 unmodified lines | ||
| 110 | 110 | .outputs = (AVFilterPad[]) {{ .name = NULL}}, |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | −static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) | |
| 113 | +static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) | |
| 114 | 114 | { |
| 115 | 115 | AVFilterContext *ctx = inlink->dst; |
| 116 | − int i; | |
| 116 | + int i, ret = 0; | |
| 117 | 117 | |
| 118 | − for (i = 0; i < ctx->nb_outputs; i++) | |
| 119 | − ff_filter_samples(inlink->dst->outputs[i], | |
| 120 | − avfilter_ref_buffer(samplesref, ~AV_PERM_WRITE)); | |
| 118 | + for (i = 0; i < ctx->nb_outputs; i++) { | |
| 119 | + ret = ff_filter_samples(inlink->dst->outputs[i], | |
| 120 | + avfilter_ref_buffer(samplesref, ~AV_PERM_WRITE)); | |
| 121 | + if (ret < 0) | |
| 122 | + break; | |
| 123 | + } | |
| 121 | 124 | avfilter_unref_buffer(samplesref); |
| 125 | + return ret; | |
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | AVFilter avfilter_af_asplit = { |