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/buffersrc.c | |
parent | 8d18bc550e7dfc62bc872507a02ae2d7827882d6 (diff) | |
download | ffmpeg-cd99146253cf9de5dad5694b97027d5612fdc61d.tar.gz |
lavfi: add error handling to filter_samples().
Diffstat (limited to 'libavfilter/buffersrc.c')
-rw-r--r-- | libavfilter/buffersrc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 0b9d5d0829..8df3b615da 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -312,6 +312,7 @@ static int request_frame(AVFilterLink *link) { BufferSourceContext *c = link->src->priv; AVFilterBufferRef *buf; + int ret = 0; if (!av_fifo_size(c->fifo)) { if (c->eof) @@ -327,7 +328,7 @@ static int request_frame(AVFilterLink *link) ff_end_frame(link); break; case AVMEDIA_TYPE_AUDIO: - ff_filter_samples(link, avfilter_ref_buffer(buf, ~0)); + ret = ff_filter_samples(link, avfilter_ref_buffer(buf, ~0)); break; default: return AVERROR(EINVAL); @@ -335,7 +336,7 @@ static int request_frame(AVFilterLink *link) avfilter_unref_buffer(buf); - return 0; + return ret; } static int poll_frame(AVFilterLink *link) |