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:
66a2979
)
lavr: mix: validate internal sample format in ff_audio_mix_init()
author
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 1 Jun 2012 19:12:03 +0000
(15:12 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Sun, 8 Jul 2012 19:22:11 +0000
(15:22 -0400)
libavresample/audio_mix.c
patch
|
blob
|
history
diff --git
a/libavresample/audio_mix.c
b/libavresample/audio_mix.c
index
9319222
..
2c2a356
100644
(file)
--- a/
libavresample/audio_mix.c
+++ b/
libavresample/audio_mix.c
@@
-305,6
+305,14
@@
int ff_audio_mix_init(AVAudioResampleContext *avr)
{
int ret;
+ if (avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P &&
+ avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP) {
+ av_log(avr, AV_LOG_ERROR, "Unsupported internal format for "
+ "mixing: %s\n",
+ av_get_sample_fmt_name(avr->internal_sample_fmt));
+ return AVERROR(EINVAL);
+ }
+
/* build matrix if the user did not already set one */
if (!avr->am->matrix) {
int i, j;