vlc | branch: master | Thomas Guillem <[email protected]> | Thu Sep 5 11:38:43 2019 +0200| [91ebbcb53568743b2cac96de83486138a12b8e5d] | committer: Thomas Guillem
aout: handle the case where the clock is paused This case can happen during a very short timespan, when the clock is paused before the aout processed the pause event. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91ebbcb53568743b2cac96de83486138a12b8e5d --- src/audio_output/dec.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c index e0c9f32b7e..05e3d355d7 100644 --- a/src/audio_output/dec.c +++ b/src/audio_output/dec.c @@ -307,6 +307,9 @@ void aout_RequestRetiming(audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t drift = -vlc_clock_Update(owner->sync.clock, system_ts, audio_ts, rate); + if (unlikely(drift == INT64_MAX)) + return; /* cf. INT64_MAX comment in aout_DecPlay() */ + /* Late audio output. * This can happen due to insufficient caching, scheduling jitter * or bug in the decoder. Ideally, the output would seek backward. But that @@ -456,9 +459,16 @@ int aout_DecPlay(audio_output_t *aout, block_t *block) vlc_tick_t system_now = vlc_tick_now(); aout_DecSynchronize(aout, system_now, original_pts); - const vlc_tick_t play_date = + vlc_tick_t play_date = vlc_clock_ConvertToSystem(owner->sync.clock, system_now, original_pts, owner->sync.rate); + if (unlikely(play_date == INT64_MAX)) + { + /* The clock is paused but not the output, play the audio anyway since + * we can't delay audio playback from here. */ + play_date = system_now; + + } /* Output */ owner->sync.discontinuity = false; aout->play(aout, block, play_date); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
