[vlc-commits] demux: vobsub: DEMUX_SET_POSITION just does a DEMUX_SET_TIME

Steve Lhomme git at videolan.org
Thu Sep 20 12:44:03 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 11:26:57 2018 +0200| [a1e31bce590fcb5174ca4496ab3ce674e768ea4a] | committer: Steve Lhomme

demux: vobsub: DEMUX_SET_POSITION just does a DEMUX_SET_TIME

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

 modules/demux/vobsub.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index abeacd6cd8..c52af18016 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -312,19 +312,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         case DEMUX_SET_POSITION:
             f = va_arg( args, double );
             i64 = (vlc_tick_t) f * p_sys->i_length;
-
-            for( i = 0; i < p_sys->i_tracks; i++ )
-            {
-                p_sys->track[i].i_current_subtitle = 0;
-                while( p_sys->track[i].i_current_subtitle < p_sys->track[i].i_subtitles &&
-                       p_sys->track[i].p_subtitles[p_sys->track[i].i_current_subtitle].i_start < i64 )
-                {
-                    p_sys->track[i].i_current_subtitle++;
-                }
-                if( p_sys->track[i].i_current_subtitle >= p_sys->track[i].i_subtitles )
-                    return VLC_EGENERIC;
-            }
-            return VLC_SUCCESS;
+            return demux_Control(p_demux, DEMUX_SET_TIME, i64, false);
 
         case DEMUX_SET_NEXT_DEMUX_TIME:
             p_sys->i_next_demux_date = va_arg( args, vlc_tick_t );



More information about the vlc-commits mailing list