Attempt to reload stream on "Server does not support seeking." error (#5923)

When the network connection changes while playing an HTTP stream, I always get the "Server does not support seeking." error from GStreamer.
It seems like GStreamer tries to seek on reconnect, which fails, an propagates the error to Clementine which in turn ceases playback with
the error message handed through from GStreamer, even though there is now a perfectly fine network connection again.

As a workaround, try to reload the stream when this error occurs.

fixes #5116
This commit is contained in:
benpicco 2017-12-11 01:13:30 +01:00 committed by John Maguire
parent 3134e09aec
commit 27bef68cf6
1 changed files with 12 additions and 0 deletions

View File

@ -692,6 +692,18 @@ void GstEngine::HandlePipelineError(int pipeline_id, const QString& message,
qLog(Warning) << "Gstreamer error:" << message;
// try to reload the URL in case of a drop of the connection
if (domain == GST_RESOURCE_ERROR && error_code == GST_RESOURCE_ERROR_SEEK) {
if (Load(url_, 0, false, 0, 0)) {
current_pipeline_->SetState(GST_STATE_PLAYING);
return;
}
qLog(Warning) << "Attempt to reload " << url_ << " failed";
}
current_pipeline_.reset();
BufferingFinished();