diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-08 22:48:16 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-04-08 23:24:09 +0400 |
commit | ed8373e7db14e608641f4db4f2dc3047048013f3 (patch) | |
tree | e2e967e830c06bec013599a55f5aa4f14f3082a4 /libavfilter/af_atempo.c | |
parent | e82f562fa5ef7de4764ccd699c1fc8430454f17a (diff) |
lavfi: always check return value of ff_get_{audio,video}_buffer()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_atempo.c')
-rw-r--r-- | libavfilter/af_atempo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index af49b0b771..6fe8b2c927 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -1062,6 +1062,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer) while (src < src_end) { if (!atempo->dst_buffer) { atempo->dst_buffer = ff_get_audio_buffer(outlink, n_out); + if (!atempo->dst_buffer) + return AVERROR(ENOMEM); av_frame_copy_props(atempo->dst_buffer, src_buffer); atempo->dst = atempo->dst_buffer->data[0]; @@ -1100,6 +1102,8 @@ static int request_frame(AVFilterLink *outlink) while (err == AVERROR(EAGAIN)) { if (!atempo->dst_buffer) { atempo->dst_buffer = ff_get_audio_buffer(outlink, n_max); + if (!atempo->dst_buffer) + return AVERROR(ENOMEM); atempo->dst = atempo->dst_buffer->data[0]; atempo->dst_end = atempo->dst + n_max * atempo->stride; |