diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-12 19:43:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-12 22:21:34 +0200 |
commit | d7b9cb2f7a51351586791e65fa22e6536ee58c9f (patch) | |
tree | 1318ef39375afcce3319123623cf3c07d8d327f0 /libswresample/swresample.c | |
parent | 14edc9f3a3924237e4fd57bac301a9cbd263ab79 (diff) | |
download | ffmpeg-d7b9cb2f7a51351586791e65fa22e6536ee58c9f.tar.gz |
swresample: Allow reinitialization without ever setting channel counts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index c2be82c4e5..cb17e1675d 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -164,6 +164,10 @@ av_cold int swr_init(struct SwrContext *s){ return AVERROR(EINVAL); } + s->out.ch_count = s-> user_out_ch_count; + s-> in.ch_count = s-> user_in_ch_count; + s->used_ch_count = s->user_used_ch_count; + if(av_get_channel_layout_nb_channels(s-> in_ch_layout) > SWR_CH_MAX) { av_log(s, AV_LOG_WARNING, "Input channel layout 0x%"PRIx64" is invalid or unsupported.\n", s-> in_ch_layout); s->in_ch_layout = 0; |