On Thu, Jun 04, 2015 at 07:54:15PM +0200, wm4 wrote: > This makes no sense in this context, and can cause swr_get_out_samples() > and swr_get_delay() negative numbers that are not error codes. > --- > libswresample/soxr_resample.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
is there an actual case where a negative value occurs or is this
"just to be sure" ?
also ive added the soxr_resample author to CC, he might want to
comment
>
> diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c
> index 0f75bc5..9597e1f 100644
> --- a/libswresample/soxr_resample.c
> +++ b/libswresample/soxr_resample.c
> @@ -88,7 +88,7 @@ static int process(
>
> static int64_t get_delay(struct SwrContext *s, int64_t base){
> double delay_s = soxr_delay((soxr_t)s->resample) / s->out_sample_rate;
> - return (int64_t)(delay_s * base + .5);
> + return (int64_t)(FFMAX(delay_s, 0) * base + .5);
> }
>
> static int invert_initial_buffer(struct ResampleContext *c, AudioData *dst,
> const AudioData *src,
> --
> 2.1.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
