summaryrefslogtreecommitdiff
path: root/libswresample/rematrix.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-08 21:55:33 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-08 21:55:33 +0200
commitca30ae12c5b7b8f8975e7bc70b2c33e8b06587e4 (patch)
tree32d9163e91485a7f2e8e7257a380827c9ea4b611 /libswresample/rematrix.c
parentdfde3d497e7e315387697c7b13b612a99478e44f (diff)
swr: add all in one rematrixing function ptr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r--libswresample/rematrix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 872722ffe4..1b8e65a1f4 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -291,6 +291,8 @@ int swri_rematrix_init(SwrContext *s){
int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);
+ s->mix_any_f = NULL;
+
if (!s->rematrix_custom) {
int r = auto_matrix(s);
if (r)
@@ -346,6 +348,11 @@ void swri_rematrix_free(SwrContext *s){
int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy){
int out_i, in_i, i, j;
+ if(s->mix_any_f) {
+ s->mix_any_f(out->ch, in->ch, s->native_matrix, len);
+ return 0;
+ }
+
av_assert0(out->ch_count == av_get_channel_layout_nb_channels(s->out_ch_layout));
av_assert0(in ->ch_count == av_get_channel_layout_nb_channels(s-> in_ch_layout));