Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 47fbbd7c rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Set times to 0 when playback stops

parent 7c783dfc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!75Resolve "Stickers in lkt"
...@@ -277,6 +277,7 @@ module_sdl2_close(struct lkt_win *const win) ...@@ -277,6 +277,7 @@ module_sdl2_close(struct lkt_win *const win)
{ {
RETURN_UNLESS(win && win->window, "Invalid arguments", NOTHING); RETURN_UNLESS(win && win->window, "Invalid arguments", NOTHING);
struct module_sdl2_window *sdl2 = win->window; struct module_sdl2_window *sdl2 = win->window;
sdl2->mpv_time_pos = (sdl2->mpv_duration = 0);
RETURN_UNLESS(sdl2->mpv, "Missing mpv ctx", NOTHING); RETURN_UNLESS(sdl2->mpv, "Missing mpv ctx", NOTHING);
static const char *cmd[] = { "stop", NULL }; static const char *cmd[] = { "stop", NULL };
mpv_command_async((mpv_handle *) sdl2->mpv, 0, cmd); mpv_command_async((mpv_handle *) sdl2->mpv, 0, cmd);
......
...@@ -200,7 +200,7 @@ module_x11_close(struct lkt_win *const win) ...@@ -200,7 +200,7 @@ module_x11_close(struct lkt_win *const win)
struct module_x11_window *const x11_win = win->window; struct module_x11_window *const x11_win = win->window;
lmpv_free(&x11_win->mpv); lmpv_free(&x11_win->mpv);
x11_win->child_display = NULL; x11_win->child_display = NULL;
x11_win->child_win = 0; x11_win->child_win = (x11_win->mpv_time_pos = (x11_win->mpv_duration = 0));
} }
void void
......
...@@ -151,6 +151,8 @@ loop: ...@@ -151,6 +151,8 @@ loop:
break; break;
case MPV_EVENT_SHUTDOWN: case MPV_EVENT_SHUTDOWN:
*time_pos = 0;
*time_duration = 0;
database_queue_stop(db); database_queue_stop(db);
win->close(win); win->close(win);
return 1; return 1;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter