[FFmpeg-devel] [PATCH] cdxl: fix duration

Piotr Bandurski ami_stuff at o2.pl
Mon Dec 17 20:46:24 CET 2012


Hi,

> On 17/12/2012 12:11 PM, Derek Buitenhuis wrote:
> >  +            st->duration             = frames * audio_size;
> 
> Actually, how does this even work? Audio size is not the number of total
> samples, AFAIK.

Generally it should be frames * audio_size / cdxl->sample_rate, but FFmpeg
divides by sample rate automaticly because of

avpriv_set_pts_info(st, 64, 1, cdxl->sample_rate);

Regards



More information about the ffmpeg-devel mailing list