From d1a78c315dfbfb4f2075d73c75f8b35d0808ca8a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 27 Mar 2007 06:17:37 +0000 Subject: [PATCH] fix m_fTimestampOffset --- .../src/arch/MovieTexture/MovieTexture_FFMpeg.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp index 53e601f789..601628f655 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp @@ -468,16 +468,12 @@ int MovieDecoder_FFMpeg::DecodePacket( float fTargetTime ) if( m_Frame.pict_type == FF_B_TYPE ) m_bHadBframes = true; - if( m_iFrameNumber == 1 ) + if( m_iFrameNumber == 0 ) { /* Some videos start with a timestamp other than 0. I think this is used * when audio starts before the video. We don't want to honor that, since - * the DShow renderer doesn't and we don't want to break sync compatibility. - * - * Look at the second frame. (If we have B-frames, the first frame will be an - * I-frame with the timestamp of the next P-frame, not its own timestamp, and we - * want to ignore that and look at the next B-frame.) */ - const float expect = m_fLastFrameDelay; + * the DShow renderer doesn't and we don't want to break sync compatibility. */ + const float expect = 0; const float actual = m_fTimestamp; if( actual - expect > 0 ) {