FFmpeg: use the cached pkt_dts for timestamps

This appears to work far more consistently at the beginnings and ends of
videos.
This commit is contained in:
Devin J. Pohly
2013-08-23 00:02:07 -04:00
parent 9f06195b73
commit df543ff86c
@@ -306,9 +306,9 @@ int MovieDecoder_FFMpeg::DecodePacket( float fTargetTime )
m_bGetNextTimestamp = true;
if( m_fPTS != -1 )
if( m_Frame.pkt_dts != AV_NOPTS_VALUE )
{
m_fTimestamp = m_fPTS;
m_fTimestamp = (float) (m_Frame.pkt_dts * av_q2d(m_pStream->time_base));
}
else
{