diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2013-09-07 19:14:50 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-09-07 19:14:50 +0100 |
commit | 9613f79c1e63ca6a7257484402cc3fb4e0a9fc51 (patch) | |
tree | be00b221c1f96015ab09bc0364b75b2d2fc311e4 | |
parent | 8492b956cd3ce23eb38bf78d3aaaeafbcc125e2e (diff) |
tools: play: set playbin to NULL state on error to flush messages
Just flushing the bus doesn't work here for some reason, so set
playbin to NULL state, which seems to clear all error state and
makes sure we do play the next playable song and don't pick up
'ghost' error messages from previous files on the bus.
-rw-r--r-- | tools/gst-play.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c index 5958e1e7d..5fb03f8d0 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -240,6 +240,9 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) g_error_free (err); g_free (dbg); + /* flush any other error messages from the bus and clean up */ + gst_element_set_state (play->playbin, GST_STATE_NULL); + if (play->missing != NULL && play_install_missing_plugins (play)) { g_print ("New plugins installed, trying again...\n"); --play->cur_idx; |