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
Branches
Étiquettes
1 requête de fusion!75Resolve "Stickers in lkt"
......@@ -277,6 +277,7 @@ module_sdl2_close(struct lkt_win *const win)
{
RETURN_UNLESS(win && win->window, "Invalid arguments", NOTHING);
struct module_sdl2_window *sdl2 = win->window;
sdl2->mpv_time_pos = (sdl2->mpv_duration = 0);
RETURN_UNLESS(sdl2->mpv, "Missing mpv ctx", NOTHING);
static const char *cmd[] = { "stop", NULL };
mpv_command_async((mpv_handle *) sdl2->mpv, 0, cmd);
......
......@@ -200,7 +200,7 @@ module_x11_close(struct lkt_win *const win)
struct module_x11_window *const x11_win = win->window;
lmpv_free(&x11_win->mpv);
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
......
......@@ -151,6 +151,8 @@ loop:
break;
case MPV_EVENT_SHUTDOWN:
*time_pos = 0;
*time_duration = 0;
database_queue_stop(db);
win->close(win);
return 1;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter