]> git.sesse.net Git - vlc/commitdiff
input_control: i_title_offset was not the current title
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 20 Jul 2011 18:28:20 +0000 (20:28 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 20 Jul 2011 18:31:22 +0000 (20:31 +0200)
src/input/control.c

index de8d8a11fff264ce6cb16e5b3d108a6a552d4ae8..a1d80bdeff03a72685cd9f776981427b48365a3f 100644 (file)
@@ -332,9 +332,9 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
 
             vlc_mutex_lock( &p_input->p->p_item->lock );
 
-            /* current title if -1 */
-            if ( *pi_req_title_offset < 0 )
-                *pi_req_title_offset = p_input->p->i_title_offset;
+            int i_current_title = var_GetInteger( p_input, "title" );
+            if ( *pi_req_title_offset < 0 ) /* return current title if -1 */
+                *pi_req_title_offset = i_current_title;
 
             if( p_input->p->i_title && p_input->p->i_title > *pi_req_title_offset )
             {