[vlc-commits] demux: ogg: handle precise seek

Francois Cartegnie git at videolan.org
Mon Jul 31 18:25:48 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jul 28 10:47:50 2017 +0200| [52363f803f688dea56409289dd9464cfb65757fe] | committer: Francois Cartegnie

demux: ogg: handle precise seek

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

 modules/demux/ogg.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 2bf003e37d..1b76c6fde7 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -764,7 +764,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     vlc_meta_t *p_meta;
     int64_t *pi64, i64;
     double *pf, f;
-    bool *pb_bool, b;
+    bool *pb_bool, b, acc;
 
     switch( i_query )
     {
@@ -793,6 +793,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_SET_TIME:
             i64 = va_arg( args, int64_t );
+            acc = va_arg( args, int );
             logical_stream_t *p_stream = Ogg_GetSelectedStream( p_demux );
             if ( !p_stream )
             {
@@ -803,8 +804,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             if ( Oggseek_BlindSeektoAbsoluteTime( p_demux, p_stream, i64, b ) )
             {
                 Ogg_ResetStreamsHelper( p_sys );
-                es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                VLC_TS_0 + i64 );
+                if( acc )
+                    es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
+                                    VLC_TS_0 + i64 );
                 return VLC_SUCCESS;
             }
             else
@@ -861,6 +863,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             vlc_stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b );
 
             f = va_arg( args, double );
+            acc = va_arg( args, int );
             if ( p_sys->i_length <= 0 || !b /* || ! STREAM_CAN_FASTSEEK */ )
             {
                 Ogg_ResetStreamsHelper( p_sys );
@@ -873,8 +876,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             Ogg_ResetStreamsHelper( p_sys );
             if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, i64 ) >= 0 )
             {
-                es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                VLC_TS_0 + i64 );
+                if( acc )
+                    es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
+                                    VLC_TS_0 + i64 );
                 return VLC_SUCCESS;
             }
 



More information about the vlc-commits mailing list