[Linux-kernel-mentees] [PATCH] media: vidtv: fix build on 32bit architectures

Daniel W. S. Almeida dwlsalmeida at gmail.com
Wed Sep 16 13:43:42 UTC 2020

Hi Mauro, Geert,

> That doesn't seem to be the right thing to do here.
> Assuming that sampling rate is 48 kHz, you'll
> have duration = 1.875, which would be rounded to 1.
> In other words, the above is identical to:
> au->pts = count
> Now, I don't know from where that CLOCK_UNIT_90KHZ came from.

Mauro, here's my current understanding:

The values for PTS have to be defined in terms of a 90khz clock. 

So for 30fps video, the values for PTS per frame would be:

frame_num/30 * 90000

so 0, 3000, 6000, 9000...etc

The same math is being used here for audio, but instead we have the
total audio sample count and a 48000 samples/sec

I did miss this rounding error though, I'm sorry.

More information about the Linux-kernel-mentees mailing list