diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-08 19:29:42 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 11:14:04 +0400 |
commit | ebc8d974817fe456a0afe6867fdeb22c761fb04f (patch) | |
tree | d08864445a712ca289ef8a1b2a4fa4d7ff2e81e0 /libavfilter/buffersink.c | |
parent | 1470ce21cec5ee26e106e2a884c26bbf84e5aaea (diff) |
lavfi: add error handling to start_frame().
Diffstat (limited to 'libavfilter/buffersink.c')
-rw-r--r-- | libavfilter/buffersink.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 76a0585ee1..04320b5654 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -47,20 +47,16 @@ static av_cold void uninit(AVFilterContext *ctx) av_audio_fifo_free(sink->audio_fifo); } -static void start_frame(AVFilterLink *link, AVFilterBufferRef *buf) +static int start_frame(AVFilterLink *link, AVFilterBufferRef *buf) { BufferSinkContext *s = link->dst->priv; av_assert0(!s->cur_buf); s->cur_buf = buf; link->cur_buf = NULL; -}; -static int filter_samples(AVFilterLink *link, AVFilterBufferRef *buf) -{ - start_frame(link, buf); return 0; -} +}; int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf) { @@ -166,7 +162,7 @@ AVFilter avfilter_asink_abuffer = { .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_AUDIO, - .filter_samples = filter_samples, + .filter_samples = start_frame, .min_perms = AV_PERM_READ, .needs_fifo = 1 }, { .name = NULL }}, |