summaryrefslogtreecommitdiff
authorJustin Ruggles <justin.ruggles@gmail.com>2013-01-16 19:15:57 (GMT)
committer Justin Ruggles <justin.ruggles@gmail.com>2013-01-18 00:27:01 (GMT)
commitf07ef2d9c9e9d1e84c532e9102594834e88a5c83 (patch)
tree4bf2f48cf30fa3938611cf180d79baa97a1ebe20
parent56ef1ef1f7580f41d6819ac63081a02f52752903 (diff)
downloadffmpeg-f07ef2d9c9e9d1e84c532e9102594834e88a5c83.zip
ffmpeg-f07ef2d9c9e9d1e84c532e9102594834e88a5c83.tar.gz
ffmpeg-f07ef2d9c9e9d1e84c532e9102594834e88a5c83.tar.bz2
lavr: call mix_function_init() in ff_audio_mix_set_matrix()
This is needed if a custom matrix is set by the user after opening the AVAudioResampleContext because the matrix channel count can change if different mixing coefficients are used. CC:libav-stable@libav.org
Diffstat
-rw-r--r--libavresample/audio_mix.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c
index 12f5d24..7ed32d8 100644
--- a/libavresample/audio_mix.c
+++ b/libavresample/audio_mix.c
@@ -422,10 +422,6 @@ AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr)
av_free(matrix_dbl);
}
- ret = mix_function_init(am);
- if (ret < 0)
- goto error;
-
return am;
error:
@@ -704,5 +700,5 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
return AVERROR(EINVAL);
}
- return 0;
+ return mix_function_init(am);
}