Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
bcc5b3f6
Commit
bcc5b3f6
authored
May 05, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: allow pause and stop during buffering (fixes: #2679)
parent
256c86bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/control/media_player.c
src/control/media_player.c
+7
-7
No files found.
src/control/media_player.c
View file @
bcc5b3f6
...
@@ -653,13 +653,11 @@ void libvlc_media_player_pause( libvlc_media_player_t *p_mi,
...
@@ -653,13 +653,11 @@ void libvlc_media_player_pause( libvlc_media_player_t *p_mi,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
if
(
state
==
libvlc_Playing
||
state
==
libvlc_Buffering
)
if
(
state
==
libvlc_Playing
)
{
{
if
(
libvlc_media_player_can_pause
(
p_mi
,
p_e
)
)
if
(
libvlc_media_player_can_pause
(
p_mi
,
p_e
)
)
input_Control
(
p_input_thread
,
INPUT_SET_STATE
,
PAUSE_S
);
input_Control
(
p_input_thread
,
INPUT_SET_STATE
,
PAUSE_S
);
...
@@ -681,7 +679,7 @@ int libvlc_media_player_is_playing( libvlc_media_player_t *p_mi,
...
@@ -681,7 +679,7 @@ int libvlc_media_player_is_playing( libvlc_media_player_t *p_mi,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
return
libvlc_Playing
==
state
;
return
(
libvlc_Playing
==
state
)
||
(
libvlc_Buffering
==
state
)
;
}
}
/**************************************************************************
/**************************************************************************
...
@@ -692,10 +690,12 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
...
@@ -692,10 +690,12 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
{
{
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
,
p_e
);
if
(
state
==
libvlc_Playing
||
state
==
libvlc_Paused
)
if
(
state
==
libvlc_Playing
||
state
==
libvlc_Paused
||
state
==
libvlc_Buffering
)
{
{
/* Send a stop notification event only if we are in playing
or
/* Send a stop notification event only if we are in playing
,
* paused states */
*
buffering or
paused states */
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Ended
,
p_e
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Ended
,
p_e
);
/* Construct and send the event */
/* Construct and send the event */
...
...
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