aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/fifo.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-15 11:16:53 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commit1dc42050185d63c1de5d16146fbaee92640af187 (patch)
treee53dbbfc52894acf4efd526b9ddcaf1d0b87d94d /libavfilter/fifo.c
parent80e4ed279b3abe9f5356e2b56255b2aa64527345 (diff)
downloadffmpeg-1dc42050185d63c1de5d16146fbaee92640af187.tar.gz
lavfi: check all avfilter_ref_buffer() calls for errors.
Diffstat (limited to 'libavfilter/fifo.c')
-rw-r--r--libavfilter/fifo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index 8264d5302e..3226a0ddbe 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -169,6 +169,9 @@ static int return_audio_frame(AVFilterContext *ctx)
queue_pop(s);
} else {
buf_out = avfilter_ref_buffer(head, AV_PERM_READ);
+ if (!buf_out)
+ return AVERROR(ENOMEM);
+
buf_out->audio->nb_samples = link->request_samples;
buffer_offset(link, head, link->request_samples);
}