[Libav-user] Understanding a line in muxing.c

Gonzalo Garramuno ggarra13 at gmail.com
Fri May 16 18:39:54 CEST 2014

I have trouble understanding what the following line in muxing.c does:

       /* compute destination number of samples */
       dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_ctx, 
c->sample_rate) + src_nb_samples, c->sample_rate, c->sample_rate, 

I was always expecting that:

dst_nb_samples = src_nb_samples;

Can someone explain to me why the above is needed?

More information about the Libav-user mailing list