mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 11:56:45 +01:00
When receiving a buffering message, do the pipeline state change in a different thread to avoid a deadlock with the main thread when the user is seeking.
Fixes issue 2709
This commit is contained in:
parent
5b888473aa
commit
96eccdfabf
@ -589,12 +589,12 @@ void GstEnginePipeline::BufferingMessageReceived(GstMessage* msg) {
|
||||
buffering_ = true;
|
||||
emit BufferingStarted();
|
||||
|
||||
gst_element_set_state(pipeline_, GST_STATE_PAUSED);
|
||||
SetState(GST_STATE_PAUSED);
|
||||
} else if (percent == 100 && buffering_) {
|
||||
buffering_ = false;
|
||||
emit BufferingFinished();
|
||||
|
||||
gst_element_set_state(pipeline_, GST_STATE_PLAYING);
|
||||
SetState(GST_STATE_PLAYING);
|
||||
} else if (buffering_) {
|
||||
emit BufferingProgress(percent);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user