]> git.sesse.net Git - vlc/commitdiff
bluray: Removing useless title management code.
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Thu, 8 Mar 2012 12:03:14 +0000 (13:03 +0100)
committerHugo Beauzée-Luyssen <beauze.h@gmail.com>
Thu, 8 Mar 2012 12:11:00 +0000 (13:11 +0100)
As pointed by fenrir, this is already handled by the core.

modules/access/bluray.c

index 274753c7e9a6375b504031505b9bb1d1fbffdd20..bf28cb85ea5552f62167bb248fa444e1ee17b624 100644 (file)
@@ -148,8 +148,6 @@ static int blurayOpen( vlc_object_t *object )
     demux_t *p_demux = (demux_t*)object;
     demux_sys_t *p_sys;
 
-    char *pos_title;
-    int i_title = -1;
     char bd_path[PATH_MAX] = { '\0' };
     const char *error_msg = NULL;
 
@@ -273,16 +271,9 @@ static int blurayOpen( vlc_object_t *object )
         /* Registering overlay event handler */
         bd_register_overlay_proc(p_sys->bluray, p_demux, blurayOverlayProc);
     } else {
-        /* get title request */
-        if ((pos_title = strrchr(bd_path, ':'))) {
-            /* found character ':' for title information */
-            *(pos_title++) = '\0';
-            i_title = atoi(pos_title);
-        }
-
         /* set start title number */
-        if (bluraySetTitle(p_demux, i_title) != VLC_SUCCESS) {
-            msg_Err( p_demux, "Could not set the title %d", i_title );
+        if (bluraySetTitle(p_demux, p_sys->i_longest_title) != VLC_SUCCESS) {
+            msg_Err( p_demux, "Could not set the title %d", p_sys->i_longest_title );
             goto error;
         }
     }