[FFmpeg-devel] [PATCH] swresample/swresample: Fix input channel count in resample_first computation
Marcin Gorzel
gorzel at google.com
Wed Jul 25 05:32:52 EEST 2018
Looks good, thanks Michael!
On Tue, Jul 24, 2018 at 6:15 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:
> Found-by: Marcin Gorzel <gorzel at google.com>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libswresample/swresample.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libswresample/swresample.c b/libswresample/swresample.c
> index 5bd39caac4..6d28e6a798 100644
> --- a/libswresample/swresample.c
> +++ b/libswresample/swresample.c
> @@ -318,7 +318,7 @@ av_cold int swr_init(struct SwrContext *s){
>
> av_assert0(s->used_ch_count);
> av_assert0(s->out.ch_count);
> - s->resample_first= RSC*s->out.ch_count/s->in.ch_count - RSC <
> s->out_sample_rate/(float)s-> in_sample_rate - 1.0;
> + s->resample_first= RSC*s->out.ch_count/s->used_ch_count - RSC <
> s->out_sample_rate/(float)s-> in_sample_rate - 1.0;
>
> s->in_buffer= s->in;
> s->silence = s->in;
> --
> 2.18.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
--
Marcin Gorzel | Software Engineer | gorzel at google.com |
More information about the ffmpeg-devel
mailing list