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:
David Sansome 2012-02-13 20:49:25 +00:00
parent 5b888473aa
commit 96eccdfabf
1 changed files with 2 additions and 2 deletions

View File

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