diff options
author | Wim Taymans <wtaymans@redhat.com> | 2014-04-21 15:33:10 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2014-04-21 15:40:32 +0200 |
commit | c268eab145726eba73f052fe4b190892197c48fa (patch) | |
tree | 40615864fec3c0fb7ad73546860d3fca9829e54d | |
parent | 93982071019c9378b22adb7c87d9cead093aebd9 (diff) |
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.
-rw-r--r-- | tools/gst-play.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c index e8fbfee5e..c3e0167f5 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; } } |