Commits

Felix Krull committed 1cc8379

Minor changes to EOS handling (note that it *still doesn't work*).

  • Participants
  • Parent commits 14b7df2

Comments (0)

Files changed (1)

File rgain/rgcalc.py

         elif msg.type == Gst.MessageType.EOS:
             self.emit("track-finished", to_utf8(self._current_file),
                       self.track_data[self._current_file])
+            # Preserve rganalysis state
             self.rg.set_locked_state(True)
-            self.pipe.set_state(Gst.State.NULL)
+            self.pipe.set_state(Gst.State.READY)
             ret = self._next_file()
             if ret:
-                self.rg.set_locked_state(False)
                 self.pipe.set_state(Gst.State.PLAYING)
+            self.rg.set_locked_state(False)
         elif msg.type == Gst.MessageType.ERROR:
             self.pipe.set_state(Gst.State.NULL)
             err, debug = msg.parse_error()