Commit 32d98df6 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

input.c: allow "intelligent" previous-chapter behaviour for access sources too

parent 98f16ed7
...@@ -1525,9 +1525,22 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type, ...@@ -1525,9 +1525,22 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type,
{ {
access_t *p_access = p_input->input.p_access; access_t *p_access = p_input->input.p_access;
int i_seekpoint; int i_seekpoint;
mtime_t i_input_time;
mtime_t i_seekpoint_time;
if( i_type == INPUT_CONTROL_SET_SEEKPOINT_PREV ) if( i_type == INPUT_CONTROL_SET_SEEKPOINT_PREV )
i_seekpoint = p_access->info.i_seekpoint - 1; {
i_seekpoint = p_access->info.i_seekpoint;
i_seekpoint_time = p_input->input.title[p_access->info.i_title]->seekpoint[i_seekpoint]->i_time_offset;
if ( i_seekpoint_time != -1 )
{
access2_Control( p_access, INPUT_GET_TIME, &i_input_time );
if ( i_input_time < i_seekpoint_time + 3000000 )
i_seekpoint--;
}
else
i_seekpoint--;
}
else if( i_type == INPUT_CONTROL_SET_SEEKPOINT_NEXT ) else if( i_type == INPUT_CONTROL_SET_SEEKPOINT_NEXT )
i_seekpoint = p_access->info.i_seekpoint + 1; i_seekpoint = p_access->info.i_seekpoint + 1;
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment