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:
8b8750e
)
lavfi: properly signal out-of-memory error in ff_filter_samples
author
Reinhard Tartler
<siretart@tauware.de>
Sat, 4 Aug 2012 13:24:15 +0000
(15:24 +0200)
committer
Reinhard Tartler
<siretart@tauware.de>
Sun, 5 Aug 2012 08:26:49 +0000
(10:26 +0200)
Found with a clang-scan report on http://fate.libav.org/csa/
libavfilter/audio.c
patch
|
blob
|
history
diff --git
a/libavfilter/audio.c
b/libavfilter/audio.c
index
d518b24
..
bd718c6
100644
(file)
--- a/
libavfilter/audio.c
+++ b/
libavfilter/audio.c
@@
-172,6
+172,10
@@
int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
buf_out = ff_default_get_audio_buffer(link, dst->min_perms,
samplesref->audio->nb_samples);
+ if (!buf_out) {
+ avfilter_unref_buffer(samplesref);
+ return AVERROR(ENOMEM);
+ }
buf_out->pts = samplesref->pts;
buf_out->audio->sample_rate = samplesref->audio->sample_rate;