aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/rematrix.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-12 20:50:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-17 15:20:29 +0200
commit84fedd3be7685780de8a278f86d0ecb090e6b1c2 (patch)
tree35beed3860ccec47bcf695b1c0b16d1b91802377 /libswresample/rematrix.c
parent74fb9df48b12acd42b0fe81a67dbbede5ffb88b2 (diff)
downloadffmpeg-84fedd3be7685780de8a278f86d0ecb090e6b1c2.tar.gz
swresample: Allow reinitialization without ever setting channel layouts
(cherry picked from commit 80a28c7509a11114e1aea5b208d56c6646d69c07) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r--libswresample/rematrix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 6552a2fea2..2238f0aae3 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -65,8 +65,8 @@ 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));
- nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
- nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);
+ 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];