]> git.sesse.net Git - ffmpeg/blobdiff - libswresample/rematrix.c
Merge commit '2de7650451d90520135d8cf6f96caa0658824208'
[ffmpeg] / libswresample / rematrix.c
index f26ede79f23b696fc19ff2d8859df1c060b30eec..456955813850b2aa0a229dcdea17d7d8e84849b2 100644 (file)
@@ -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];