[FFmpeg-devel] [PATCH 1/4] ffmpeg: rename a variable.

Michael Niedermayer michael at niedermayer.cc
Thu Apr 6 19:58:11 EEST 2017


On Thu, Apr 06, 2017 at 06:15:56PM +0200, Nicolas George wrote:
> Le septidi 17 germinal, an CCXXV, Michael Niedermayer a écrit :
> > what is duration_dts ?
> 
> It is the duration that is needed to update the DTS variables. The next
> patch, as you can see, introduces duration_pts for the same task for the
> PTS variables.
> 
> The current code incorrectly used the same duration for both, which is
> incorrect when a packet is not decoded into a frame immediately,
> possibly due to B-frames and reordering or to threading.

Its a while ago i worked with this and the code changed since then
so maybe iam wrong but

pkt->duration is the duration of the frame encoded in that packet
that is not neccesarily the time between its dts and the next dts
(well it is for a lot of cases of course where its guranteed but ...)

example (mpeg1/mpeg2/mpeg4)
        I   P   B   P   B
PTS     1  10   2   20  19
DTS     0   1   2   10  19
DUR     1   9   8   x   1

Its quite possible i made a mistake of course ...


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170406/fbcb7c5d/attachment.sig>


More information about the ffmpeg-devel mailing list