[vlc-commits] [Git][videolan/vlc][master] input: Check if input clock is null before locking
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Sep 13 14:11:51 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
90659dd5 by Claudio Cambra at 2025-09-13T13:55:25+00:00
input: Check if input clock is null before locking
- - - - -
1 changed file:
- src/input/es_out.c
Changes:
=====================================
src/input/es_out.c
=====================================
@@ -969,10 +969,13 @@ static void EsOutChangePosition(es_out_sys_t *p_sys, bool b_flush,
vlc_list_foreach(pgrm, &p_sys->programs, node)
{
input_clock_Reset(pgrm->p_input_clock);
- vlc_clock_main_Lock(pgrm->clocks.main);
- pgrm->i_last_pcr = VLC_TICK_INVALID;
- vlc_clock_Reset(pgrm->clocks.input);
- vlc_clock_main_Unlock(pgrm->clocks.main);
+ if (pgrm->clocks.input != NULL)
+ {
+ vlc_clock_Lock(pgrm->clocks.input);
+ pgrm->i_last_pcr = VLC_TICK_INVALID;
+ vlc_clock_Reset(pgrm->clocks.input);
+ vlc_clock_Unlock(pgrm->clocks.input);
+ }
}
p_sys->b_buffering = true;
@@ -1316,6 +1319,7 @@ ClockListenerUpdate(void *opaque, vlc_tick_t ck_system,
vlc_tick_t ck_stream, double rate, bool discontinuity)
{
es_out_pgrm_t *pgrm = opaque;
+ assert(pgrm->clocks.input != NULL);
vlc_clock_Lock(pgrm->clocks.input);
if (discontinuity)
@@ -1334,6 +1338,7 @@ static void
ClockListenerReset(void *opaque)
{
es_out_pgrm_t *pgrm = opaque;
+ assert(pgrm->clocks.input != NULL);
vlc_clock_Lock(pgrm->clocks.input);
vlc_clock_Reset(pgrm->clocks.input);
vlc_clock_Unlock(pgrm->clocks.input);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90659dd5a95a50ca7e145bd775dd18c58b3b433e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90659dd5a95a50ca7e145bd775dd18c58b3b433e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list