[FFmpeg-devel] [PATCH] pulse: set default frame_size to 4608

Michael Niedermayer michaelni at gmx.at
Fri Jan 3 03:44:31 CET 2014


On Fri, Jan 03, 2014 at 01:21:41AM +0100, Federico Simoncelli wrote:
> On Thu, Jan 2, 2014 at 11:26 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, Jan 02, 2014 at 04:36:45PM +0100, Federico Simoncelli wrote:
> >> Given the current defaults (channels = 2, sample_rate = 48000) the
> >> frame_size is changed to 4608 in order to obtain whole numbers for
> >> frame_duration (both 16 and 24 bits_per_sample).
> >>
> >>  frame_duration = (frame_size * 1000000 * 8) /
> >>                   (sample_rate * channels * bits_per_sample)
> >>
> >> A message has been added to warn the user when the frame duration
> >> is not an integer.
> >
> > the timebase should be changed to a multiple of the sample rate
> > see the avpriv_set_pts_info() call
> > that avoids the problem of the durations being not exactly
> > representable
> 
> If I understand correctly what you're suggesting is:
> 
> avpriv_set_pts_info(st, 64, 1, pd->sample_rate);

yes


> 
> and it will generate non-representable timebases:
> 
> 1/48 = .020833...
> 1/44.1 = .0226757

rational numbers are quite representable, and really 1/1000000 is
a rational number in no way different than 1/48 or 1/48000 is
also if you dont like fractions you can just change the base of
your representation

1/48
In base 10
      .
0.02083

In base 48
0.1

in base 6
0.0043

so really the non representability is just an artifact of humans
having 10 fingers


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140103/6a40faba/attachment.asc>


More information about the ffmpeg-devel mailing list