From c268eab145726eba73f052fe4b190892197c48fa Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 21 Apr 2014 15:33:10 +0200 Subject: [PATCH] play: Update buffering state for live pipelines Update the buffering variable, even for live pipelines so that we don't print \n for each buffering message. --- tools/gst-play.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/gst-play.c b/tools/gst-play.c index e8fbfee5e0..c3e0167f5f 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -217,20 +217,19 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) gst_message_parse_buffering (msg, &percent); g_print ("%s %d%% \r", _("Buffering..."), percent); - /* no state management needed for live pipelines */ - if (play->is_live) - break; - if (percent == 100) { /* a 100% message means buffering is done */ if (play->buffering) { play->buffering = FALSE; - gst_element_set_state (play->playbin, play->desired_state); + /* no state management needed for live pipelines */ + if (!play->is_live) + gst_element_set_state (play->playbin, play->desired_state); } } else { /* buffering... */ if (!play->buffering) { - gst_element_set_state (play->playbin, GST_STATE_PAUSED); + if (!play->is_live) + gst_element_set_state (play->playbin, GST_STATE_PAUSED); play->buffering = TRUE; } }