diff options
author | Vodyannikov Aleksandr <Aleksoid1978@mail.ru> | 2016-10-20 06:57:35 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-10-26 19:27:22 +0200 |
commit | 9445e7e6d562e14a6fbc3f73cd282136a239a611 (patch) | |
tree | 0dd9c5f446ea250264a04b964012fe6b6888d4b3 /libswresample | |
parent | ded5c885281a67e368fc64cbe3b07f3fdc4c1d2a (diff) | |
download | ffmpeg-9445e7e6d562e14a6fbc3f73cd282136a239a611.tar.gz |
swresample/rematrix: Fix float part of swr_set_matrix()
Fixes Ticket #5897.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswresample')
-rw-r--r-- | libswresample/rematrix.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 1af2498530..4721063a13 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -68,14 +68,12 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) if (!s || s->in_convert) // s needs to be allocated but not initialized return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); + memset(s->matrix_flt, 0, sizeof(s->matrix_flt)); nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) - s->matrix[out][in] = matrix[in]; - if (s->int_sample_fmt == AV_SAMPLE_FMT_FLTP) - for (in = 0; in < nb_in; in++) - s->matrix_flt[out][in] = matrix[in]; + s->matrix_flt[out][in] = s->matrix[out][in] = matrix[in]; matrix += stride; } s->rematrix_custom = 1; |