<div dir="ltr"><br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 2:47 PM, wm4 <span dir="ltr"><<a href="mailto:nfxjfg@googlemail.com" target="_blank">nfxjfg@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Tue, 3 Mar 2015 12:27:51 +0300<br>
Max Vlasov <<a href="mailto:max.vlasov@gmail.com">max.vlasov@gmail.com</a>> wrote:<br>
<br>
><br>
> It turns out that it is just a get accessor for best_effort_timestamp field<br>
> and the corresponding set accessor (av_frame_set_best_effort_timestamp) is<br>
> called twice (in avcodec_decode_video2 and in avcodec_decode_audio4) in the<br>
> utils.c with a similar lines<br>
<br>
</span>As I said, it's only a helper. What you really should do is always<br>
using the PTS, and if the PTS is not available, use the DTS. The extra<br>
heuristics are useful only for broken files and such; and they can be<br>
better than what best_effort_timestamp does.<br>
<br></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">You probably mean pkt_pts, pkt_dts from the frame, right? At least I see that this values used by this simple function (guess_correct_pts) as incoming data for comparison. And also quick test shows that best_effort_timestamp is equal to (if pkt_pts valid then pkt_pts else pkt_dts) value most of the time. <br><br></div><div class="gmail_extra">I also see that guess_correct_pts is the mutating function relying on the statistics of decoding which might be different for different seek/play scenarios. <br><br>So it looks like best_effort_timestamp not so great after all, but It's strange that no simple function was implemented so far to implement this simple conditional (pkt_pts first, pkt_dts next). <br></div></div></div>