From 8902776b32430ce566d5201d93b6a6d733730aab Mon Sep 17 00:00:00 2001 From: Eoin O'Neill Date: Sat, 1 Sep 2018 20:33:46 -0700 Subject: [PATCH] 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. --- src/engines/gstenginepipeline.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index a47d32aa6..25fdffcb3 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -900,7 +900,8 @@ GstPadProbeReturn GstEnginePipeline::HandoffCallback(GstPad*, if (instance->emit_track_ended_on_time_discontinuity_) { 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"; instance->emit_track_ended_on_time_discontinuity_ = false; emit instance->EndOfStreamReached(instance->id(), true);