Move stop playback in error handler to after the error is logged to make cause and effect more obvious

This commit is contained in:
Thomas Adamcik 2011-05-16 21:49:19 +02:00
parent 09a1d646f2
commit f7f26403af

View File

@ -96,11 +96,9 @@ class GStreamer(ThreadingActor):
'Telling backend ...')
self._get_backend().playback.on_end_of_track()
elif message.type == gst.MESSAGE_ERROR:
self.stop_playback()
error, debug = message.parse_error()
logger.error(u'%s %s', error, debug)
# FIXME Should we send 'stop_playback' to the backend here? Can we
# differentiate on how serious the error is?
self.stop_playback()
elif message.type == gst.MESSAGE_WARNING:
error, debug = message.parse_warning()
logger.warning(u'%s %s', error, debug)