On Tue, Mar 3, 2015 at 2:47 PM, wm4 <[email protected]> wrote: > On Tue, 3 Mar 2015 12:27:51 +0300 > Max Vlasov <[email protected]> wrote: > > > > > It turns out that it is just a get accessor for best_effort_timestamp > field > > and the corresponding set accessor (av_frame_set_best_effort_timestamp) > is > > called twice (in avcodec_decode_video2 and in avcodec_decode_audio4) in > the > > utils.c with a similar lines > > As I said, it's only a helper. What you really should do is always > using the PTS, and if the PTS is not available, use the DTS. The extra > heuristics are useful only for broken files and such; and they can be > better than what best_effort_timestamp does. > >
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. 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. 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).
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
