diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 520ac41c..144a0b78 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -320,6 +320,11 @@ class Audio(pykka.ThreadingActor): self._playbin = playbin + def _teardown_playbin(self): + self._signals.disconnect(self._playbin, 'about-to-finish') + self._signals.disconnect(self._playbin, 'source-setup') + self._playbin.set_state(gst.STATE_NULL) + def _on_about_to_finish(self, element): gst_logger.debug('Got about-to-finish event.') if self._about_to_finish_callback: @@ -336,12 +341,6 @@ class Audio(pykka.ThreadingActor): if hasattr(source.props, 'proxy'): setup_proxy(source, self._config['proxy']) - def _teardown_playbin(self): - self._signals.disconnect(self._playbin, 'about-to-finish') - self._signals.disconnect(self._playbin, 'notify::source') - self._signals.disconnect(self._playbin, 'source-setup') - self._playbin.set_state(gst.STATE_NULL) - def _setup_output(self): self._outputs = _Outputs() self._outputs.get_pad('sink').add_event_probe(self._on_pad_event)