diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-08 17:29:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:04 +0200 |
commit | ebc8d974817fe456a0afe6867fdeb22c761fb04f (patch) | |
tree | d08864445a712ca289ef8a1b2a4fa4d7ff2e81e0 /libavfilter/split.c | |
parent | 1470ce21cec5ee26e106e2a884c26bbf84e5aaea (diff) | |
download | ffmpeg-ebc8d974817fe456a0afe6867fdeb22c761fb04f.tar.gz |
lavfi: add error handling to start_frame().
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 ea610f3cb3..5ffbc856f6 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -63,14 +63,18 @@ static void split_uninit(AVFilterContext *ctx) av_freep(&ctx->output_pads[i].name); } -static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) +static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) { AVFilterContext *ctx = inlink->dst; - int i; + int i, ret = 0; - for (i = 0; i < ctx->nb_outputs; i++) - ff_start_frame(ctx->outputs[i], - avfilter_ref_buffer(picref, ~AV_PERM_WRITE)); + for (i = 0; i < ctx->nb_outputs; i++) { + ret = ff_start_frame(ctx->outputs[i], + avfilter_ref_buffer(picref, ~AV_PERM_WRITE)); + if (ret < 0) + break; + } + return ret; } static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) |