[FFmpeg-cvslog] avfilter/aresample: Check for memory alloc failure for out sample rates
Derek Buitenhuis
git at videolan.org
Thu Oct 2 13:23:08 CEST 2014
ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Thu Oct 2 11:55:51 2014 +0100| [1dbc3e8ac814f837ad2684f9b6afccff9602fe0e] | committer: Derek Buitenhuis
avfilter/aresample: Check for memory alloc failure for out sample rates
Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dbc3e8ac814f837ad2684f9b6afccff9602fe0e
---
libavfilter/af_aresample.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index 5f34321..8a8b386 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -103,6 +103,11 @@ static int query_formats(AVFilterContext *ctx)
} else {
out_samplerates = ff_all_samplerates();
}
+ if (!out_samplerates) {
+ av_log(ctx, AV_LOG_ERROR, "Cannot allocate output samplerates.\n");
+ return AVERROR(ENOMEM);
+ }
+
ff_formats_ref(out_samplerates, &outlink->in_samplerates);
if(out_format != AV_SAMPLE_FMT_NONE) {
More information about the ffmpeg-cvslog
mailing list