<font size=2 face="Arial">I read many hours to understand pts in libav.
But it seems there is no common simple way to retrieve.</font>
<br><font size=2 face="Arial">I used the method from </font><a href=http://dranger.com/ffmpeg/><font size=2 face="Arial">http://dranger.com/ffmpeg/</font></a><font size=2 face="Arial">.
</font>
<br>
<br><font size=2 face="Arial">I do something like:</font>
<br><font size=1 face="}">avcodec_decode_video2 (codecContext, frame, &got_picture_ptr,
&p);</font>
<br><font size=1 face="}">        uint64 pts = p.dts;</font>
<br><font size=1 face="}">        </font><font size=1 color=blue face="}">if</font><font size=1 face="}">(pts
== AV_NOPTS_VALUE && frame->opaque)</font>
<br><font size=1 face="}">          pts = *(uint64_t
*)frame->opaque;</font>
<br><font size=1 face="}">        </font><font size=1 color=blue face="}">if</font><font size=1 face="}">
(pts == AV_NOPTS_VALUE)</font>
<br><font size=1 face="}">          pts = 0;</font>
<br>
<br><font size=1 face="}">This approach works in some videos. But in my
.divx videos I get a pts of 3 in the first displayable frame., which is
confusing for users which work on frame level.</font>
<br><font size=1 face="}">So, does anybody know a better approach?</font>
<br>
<br>
<br><font size=2 face="Arial">Hella Aglaia Mobile Vision GmbH<br>
Steffen Roeber<br>
Firmware & Tools<br>
Treskowstr. 14, D-13089 Berlin<br>
Amtsgericht Berlin-Charlottenburg HRB 66976 B<br>
Geschäftsführer: Kay Talmi<br>
<br>
Fon:  +49 30 200 04 29– 412<br>
Fax:  +49 30 200 04 29– 109<br>
Mail: Steffen.Roeber@hella.com<br>
URL: </font><a href="www.aglaia-gmbh.de"><font size=2 face="Arial">www.aglaia-gmbh.de</font></a><font size=2 face="Arial"><br>
<br>
URL: </font><a href=www.mobilevision.de><font size=2 face="Arial">www.mobilevision.de</font></a><font size=2 face="Arial"><br>
<br>
Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe sowie Vervielfältigung,
Verwertung und Mitteilung seines Inhalts ist nur mit unserer ausdrücklichen
Genehmigung gestattet. Alle Rechte vorbehalten, insbesondere für den Fall
der Schutzrechtsanmeldung.<br>
This document has to be treated confidentially. Its contents are not to
be passed on, duplicated, exploited or disclosed without our express
permission. All rights reserved, especially the right to apply for protective
rights.</font>