Andreas Rheinhardt:
> by using a multiplication instead. The multiplication can never overflow
> an int because the sin-factor is only an int16_t.
> 
> Affected the FATE-tests filter-concat and filter-concat-vfr.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
> ---
>  libavfilter/asrc_sine.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/asrc_sine.c b/libavfilter/asrc_sine.c
> index 3a87210b4b..61499ee2cd 100644
> --- a/libavfilter/asrc_sine.c
> +++ b/libavfilter/asrc_sine.c
> @@ -247,7 +247,7 @@ static int request_frame(AVFilterLink *outlink)
>          samples[i] = sine->sin[sine->phi >> (32 - LOG_PERIOD)];
>          sine->phi += sine->dphi;
>          if (sine->beep_index < sine->beep_length) {
> -            samples[i] += sine->sin[sine->phi_beep >> (32 - LOG_PERIOD)] << 
> 1;
> +            samples[i] += sine->sin[sine->phi_beep >> (32 - LOG_PERIOD)] * 2;
>              sine->phi_beep += sine->dphi_beep;
>          }
>          if (++sine->beep_index == sine->beep_period)
> 
Will apply.

- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to