[FFmpeg-devel] [PATCH] flv 32 bit signed timestamps
Michael Niedermayer
michaelni
Mon Jul 28 20:13:27 CEST 2008
On Mon, Jul 28, 2008 at 10:17:13AM -0700, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> > On Sun, Jul 27, 2008 at 10:19:17PM -0700, Baptiste Coudurier wrote:
> >> Hi,
> >>
> >> Like figured out, flv uses 32 bit signed timestamps, meaning that
> >> pts_wrap_bits must be set to 31.
> >
> > What fails, why does it fail and how is it fixed by this change?
>
> Don't remember ?
i remember signed timestamps, flv, weird dts and pts, but i do not remember
how they where connected and how that leads to this patch or what exactly
this is supposed to change.
> Let me restate, FLV specs say timestamps are unsigned,
> while flash player use _signed_ 32 bits, this means that max timestamp
> value is INT_MAX, if you go > INT_MAX, flash player just interpret
> timestamps as 0, which is broken.
timestamps are in ms, to reach INT_MAX needs 3.5 weeks, thats not what you
mean i assume ...
so what do you mean? a few initial timestamps that a negative, no that cant
be because they should be > (unsigned)INT_MAX.
So iam confused ...
>
> > [...]
> >> @@ -362,7 +366,7 @@
> >> put_byte(pb,1); // AAC raw
> >> else if (enc->codec_id == CODEC_ID_H264) {
> >> put_byte(pb,1); // AVC NALU
> >> - put_be24(pb,pkt->pts - (int32_t)pkt->dts);
> >> + put_be24(pb,pkt->pts - pkt->dts);
> >> }
> >
> > Why was that int32_t cast there?
> >
>
> To get the really painful first negative dts which gets wrapped during
> truncate_ts.
Which values did pkt->pts and pkt->dts had, which value was stored
with and which without the cast in the file?
As far as i can see this cast should not make any difference.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080728/5d6dc1d6/attachment.pgp>
More information about the ffmpeg-devel
mailing list