]> git.sesse.net Git - vlc/commitdiff
Fixed DecoderUpdatePreroll.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 10 Mar 2009 21:56:41 +0000 (22:56 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 11 Mar 2009 22:35:49 +0000 (23:35 +0100)
It makes prerolling less precise but it will avoid loosing valid
frame.

src/input/decoder.c

index 3f0d67173e03785edda64f6c90a4ac16fb3fa3fa..96da051d0677c7aa1272551069addf1680b80d38 100644 (file)
@@ -1029,10 +1029,10 @@ static inline void DecoderUpdatePreroll( int64_t *pi_preroll, const block_t *p )
 {
     if( p->i_flags & (BLOCK_FLAG_PREROLL|BLOCK_FLAG_DISCONTINUITY) )
         *pi_preroll = INT64_MAX;
-    else if( p->i_pts > 0 )
-        *pi_preroll = __MIN( *pi_preroll, p->i_pts );
     else if( p->i_dts > 0 )
         *pi_preroll = __MIN( *pi_preroll, p->i_dts );
+    else if( p->i_pts > 0 )
+        *pi_preroll = __MIN( *pi_preroll, p->i_pts );
 }
 
 static mtime_t DecoderTeletextFixTs( mtime_t i_ts )