[vlc-commits] player: timer: fix never left pause state

Francois Cartegnie git at videolan.org
Tue Dec 15 15:32:09 UTC 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec  9 17:01:13 2020 +0100| [f0fe29a9c2e6eb682cd2aedad881e27672f55f28] | committer: Francois Cartegnie

player: timer: fix never left pause state

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f0fe29a9c2e6eb682cd2aedad881e27672f55f28
---

 src/player/input.c | 3 +++
 src/player/timer.c | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/player/input.c b/src/player/input.c
index cf83337dc8..535df00e6c 100644
--- a/src/player/input.c
+++ b/src/player/input.c
@@ -205,6 +205,9 @@ vlc_player_input_HandleState(struct vlc_player_input *input,
             break;
         case VLC_PLAYER_STATE_PLAYING:
             input->pause_date = VLC_TICK_INVALID;
+            vlc_player_UpdateTimerState(player, NULL,
+                                        VLC_PLAYER_TIMER_STATE_PLAYING,
+                                        input->pause_date);
             /* fallthrough */
         case VLC_PLAYER_STATE_STARTED:
             if (player->started &&
diff --git a/src/player/timer.c b/src/player/timer.c
index b2b9faa31a..b5f5e38214 100644
--- a/src/player/timer.c
+++ b/src/player/timer.c
@@ -201,11 +201,13 @@ vlc_player_UpdateTimerState(vlc_player_t *player, vlc_es_id_t *es_source,
             break;
 
         case VLC_PLAYER_TIMER_STATE_PAUSED:
-        default:
-            assert(state == VLC_PLAYER_TIMER_STATE_PAUSED);
             notify = true;
             assert(system_date != VLC_TICK_INVALID);
             break;
+
+        default:
+        case VLC_PLAYER_TIMER_STATE_PLAYING:
+            break;
     }
 
     player->timer.state = state;



More information about the vlc-commits mailing list