Really fix album replaygain calculation with gstreamer backend.

Fixes #2845
This commit is contained in:
Cédric Schieli 2018-03-18 15:06:18 +01:00
parent 2941833f22
commit b9bac391a9
No known key found for this signature in database
GPG key ID: 536E33BF3FD66325
2 changed files with 11 additions and 11 deletions

View file

@ -613,16 +613,6 @@ class GStreamerBackend(Backend):
self._file = self._files.pop(0)
# Disconnect the decodebin element from the pipeline, set its
# state to READY to to clear it.
self._decbin.unlink(self._conv)
self._decbin.set_state(self.Gst.State.READY)
# Set a new file on the filesrc element, can only be done in the
# READY state
self._src.set_state(self.Gst.State.READY)
self._src.set_property("location", py3_path(syspath(self._file.path)))
# Ensure the filesrc element received the paused state of the
# pipeline in a blocking manner
self._src.sync_state_with_parent()
@ -633,9 +623,18 @@ class GStreamerBackend(Backend):
self._decbin.sync_state_with_parent()
self._decbin.get_state(self.Gst.CLOCK_TIME_NONE)
# Disconnect the decodebin element from the pipeline, set its
# state to READY to to clear it.
self._decbin.unlink(self._conv)
self._decbin.set_state(self.Gst.State.READY)
# Set a new file on the filesrc element, can only be done in the
# READY state
self._src.set_state(self.Gst.State.READY)
self._src.set_property("location", py3_path(syspath(self._file.path)))
self._decbin.link(self._conv)
self._pipe.set_state(self.Gst.State.READY)
self._pipe.set_state(self.Gst.State.PLAYING)
return True

View file

@ -82,6 +82,7 @@ Fixes:
* Partially fix bash completion for subcommand names that contain hyphens.
:bug:`2836` :bug:`2837`
Thanks to :user:`jhermann`.
* Really fix album replaygain calculation with gstreamer backend. :bug:`2846`
For developers: