Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
77592b7d
Commit
77592b7d
authored
Jun 09, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed --input-repeat and large --*-caching value.
The repeat was done before buffered data were consumed.
parent
1a033fe0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
54 deletions
+53
-54
src/input/input.c
src/input/input.c
+53
-54
No files found.
src/input/input.c
View file @
77592b7d
...
...
@@ -592,14 +592,14 @@ exit:
* MainLoopDemux
* It asks the demuxer to demux some data
*/
static
void
MainLoopDemux
(
input_thread_t
*
p_input
,
bool
*
pb_changed
,
mtime_t
*
p
i_start_mdate
)
static
void
MainLoopDemux
(
input_thread_t
*
p_input
,
bool
*
pb_changed
,
mtime_t
i_start_mdate
)
{
int
i_ret
;
*
pb_changed
=
false
;
if
(
(
p_input
->
p
->
i_stop
>
0
&&
p_input
->
p
->
i_time
>=
p_input
->
p
->
i_stop
)
||
(
p_input
->
p
->
i_run
>
0
&&
*
p
i_start_mdate
+
p_input
->
p
->
i_run
<
mdate
()
)
)
(
p_input
->
p
->
i_run
>
0
&&
i_start_mdate
+
p_input
->
p
->
i_run
<
mdate
()
)
)
i_ret
=
0
;
/* EOF */
else
i_ret
=
demux_Demux
(
p_input
->
p
->
input
.
p_demux
);
...
...
@@ -629,16 +629,26 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
if
(
i_ret
==
0
)
/* EOF */
{
int
i_repeat
=
var_GetInteger
(
p_input
,
"input-repeat"
);
if
(
i_repeat
==
0
)
{
/* End of file - we do not set b_die because only the
* playlist is allowed to do so. */
msg_Dbg
(
p_input
,
"EOF reached"
);
p_input
->
p
->
input
.
b_eof
=
true
;
}
else
else
if
(
i_ret
<
0
)
{
input_ChangeState
(
p_input
,
ERROR_S
);
}
if
(
i_ret
>
0
&&
p_input
->
p
->
i_slave
>
0
)
{
SlaveDemux
(
p_input
);
}
}
static
int
MainLoopTryRepeat
(
input_thread_t
*
p_input
,
mtime_t
*
pi_start_mdate
)
{
int
i_repeat
=
var_GetInteger
(
p_input
,
"input-repeat"
);
if
(
i_repeat
==
0
)
return
VLC_EGENERIC
;
vlc_value_t
val
;
msg_Dbg
(
p_input
,
"repeating the same input (%d)"
,
i_repeat
);
...
...
@@ -666,29 +676,17 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
if
(
p_input
->
p
->
i_start
>
0
)
{
val
.
i_time
=
p_input
->
p
->
i_start
;
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_TIME
,
&
val
);
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_TIME
,
&
val
);
}
else
{
val
.
f_float
=
0
.
0
;
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_POSITION
,
&
val
);
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_POSITION
,
&
val
);
}
/* */
*
pi_start_mdate
=
mdate
();
}
}
else
if
(
i_ret
<
0
)
{
input_ChangeState
(
p_input
,
ERROR_S
);
}
if
(
i_ret
>
0
&&
p_input
->
p
->
i_slave
>
0
)
{
SlaveDemux
(
p_input
);
}
return
VLC_SUCCESS
;
}
/**
...
...
@@ -771,7 +769,7 @@ static void MainLoop( input_thread_t *p_input )
{
if
(
!
p_input
->
p
->
input
.
b_eof
)
{
MainLoopDemux
(
p_input
,
&
b_force_update
,
&
i_start_mdate
);
MainLoopDemux
(
p_input
,
&
b_force_update
,
i_start_mdate
);
i_wakeup
=
es_out_GetWakeup
(
p_input
->
p
->
p_es_out
);
}
...
...
@@ -782,6 +780,7 @@ static void MainLoop( input_thread_t *p_input )
}
else
{
if
(
MainLoopTryRepeat
(
p_input
,
&
i_start_mdate
)
)
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment