Fix crash when stopping a track while a fadeout to pause is occuring. Fixes #4800.
This commit is contained in:
parent
11d2702841
commit
ec35688c86
|
@ -489,6 +489,17 @@ void GstEngine::Stop(bool stop_after) {
|
|||
url_ = QUrl(); // To ensure we return Empty from state()
|
||||
beginning_nanosec_ = end_nanosec_ = 0;
|
||||
|
||||
// Check if we started a fade out. If it isn't finished yet and the user
|
||||
// pressed stop, we cancel the fader and just stop the playback.
|
||||
if (is_fading_out_to_pause_) {
|
||||
disconnect(current_pipeline_.get(), SIGNAL(FaderFinished()), 0, 0);
|
||||
is_fading_out_to_pause_ = false;
|
||||
has_faded_out_ = true;
|
||||
|
||||
fadeout_pause_pipeline_.reset();
|
||||
fadeout_pipeline_.reset();
|
||||
}
|
||||
|
||||
if (fadeout_enabled_ && current_pipeline_ && !stop_after) StartFadeout();
|
||||
|
||||
current_pipeline_.reset();
|
||||
|
|
Loading…
Reference in New Issue