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
1 changed files with 2 additions and 1 deletions

View File

@ -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);