diff options
author | Marcin Gorzel <gorzel-at-google.com@ffmpeg.org> | 2018-07-24 14:55:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-26 02:42:42 +0200 |
commit | 8b710ea5e7b8a3c3f60fb867bb104b0ec9ea4e83 (patch) | |
tree | ed1678f7455741e4bbc9cd377de6968deb46798f /libswresample/rematrix.c | |
parent | d01d46ad860c526e2bde9bcaca28a3592787848d (diff) | |
download | ffmpeg-streaming-8b710ea5e7b8a3c3f60fb867bb104b0ec9ea4e83.zip ffmpeg-streaming-8b710ea5e7b8a3c3f60fb867bb104b0ec9ea4e83.tar.gz |
swresample: Use channel count in rematrix initialization
Rematrixing supports up to 64 channels. However, there is only a limited number of channel layouts defined. Since the in/out channel count is currently obtained from the channel layout, for undefined layouts (e.g. for 9, 10, 11 channels etc.) the rematrixing fails.
This patch changes rematrix init methods to use in (used) and out channel count directly instead of computing it from channel layout.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r-- | libswresample/rematrix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 8227730..6b5feaa 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -384,8 +384,8 @@ av_cold static int auto_matrix(SwrContext *s) av_cold int swri_rematrix_init(SwrContext *s){ int i, j; - 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); + int nb_in = s->used_ch_count; + int nb_out = s->out.ch_count; s->mix_any_f = NULL; |