<div dir="ltr">Frankly, I thought that all alternatives should be considered _after_ av_frame_get_best_effort_timestamp returned AV_NOPTS_VALUE. At least the name suggests so. Both Stephen and ffmplay versions checks for some prior knowledge before even trying this function. Imho, If all heuristics is inside av_frame_get_best_effort_timestamp and better and better from version to version, this will be "best bet" for everyone. If single frame is not enough then this function might require the last packet or something like this, but moving all the complexity inside it will remove large part of confusion <br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 12:37 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">This is still non-sense:<br>
<br>
if(packet->dts != AV_NOPTS_VALUE) {<br>
pts = av_frame_get_best_effort_timestamp(pFrame);<br>
} else {<br>
pts = 0;<br>
}<br>
<br>
Why that stuff about dts??? This should completely fail with threaded<br>
decoding at least.<br></blockquote></div></div></div></div></div>