OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81cee70
)
avfilter/aresample: Check for memory alloc failure for out sample rates
author
Derek Buitenhuis
<derek.buitenhuis@gmail.com>
Thu, 2 Oct 2014 10:55:51 +0000
(11:55 +0100)
committer
Derek Buitenhuis
<derek.buitenhuis@gmail.com>
Thu, 2 Oct 2014 11:22:37 +0000
(12:22 +0100)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavfilter/af_aresample.c
patch
|
blob
|
history
diff --git
a/libavfilter/af_aresample.c
b/libavfilter/af_aresample.c
index
5f34321
..
8a8b386
100644
(file)
--- 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) {