[vlc-devel] commit: Fixed DecoderUpdatePreroll. (Laurent Aimar )

git version control git at videolan.org
Wed Mar 11 23:49:28 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Mar 10 22:56:41 2009 +0100| [bca439548bcbea91a8d96f8f83fd3e3aa8ba240b] | committer: Laurent Aimar 

Fixed DecoderUpdatePreroll.

It makes prerolling less precise but it will avoid loosing valid
frame.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bca439548bcbea91a8d96f8f83fd3e3aa8ba240b
---

 src/input/decoder.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 3f0d671..96da051 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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 )




More information about the vlc-devel mailing list