1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-24 00:31:36 +01:00

SPC playback fix to prevent end-of-track signal hang.

This fixes an issue with SPC playback where tracks would not properly register End-of-track
notifications when a new track begins.
This commit is contained in:
Eoin O'Neill 2018-09-01 20:33:46 -07:00 committed by John Maguire
parent a71694f61b
commit 8902776b32

View File

@ -900,7 +900,8 @@ GstPadProbeReturn GstEnginePipeline::HandoffCallback(GstPad*,
if (instance->emit_track_ended_on_time_discontinuity_) { if (instance->emit_track_ended_on_time_discontinuity_) {
if (GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT) || if (GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT) ||
GST_BUFFER_OFFSET(buf) < instance->last_buffer_offset_) { GST_BUFFER_OFFSET(buf) < instance->last_buffer_offset_ ||
!GST_BUFFER_OFFSET_IS_VALID(buf)) {
qLog(Debug) << "Buffer discontinuity - emitting EOS"; qLog(Debug) << "Buffer discontinuity - emitting EOS";
instance->emit_track_ended_on_time_discontinuity_ = false; instance->emit_track_ended_on_time_discontinuity_ = false;
emit instance->EndOfStreamReached(instance->id(), true); emit instance->EndOfStreamReached(instance->id(), true);