diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-01-17 15:10:42 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-01-17 15:13:15 +0100 |
commit | 2aa26a9807c25c0f5f4515ccff2409bc6a21e95a (patch) | |
tree | 16a1f0139c3ec43bfdf8e2ebb118499c30338975 /tools/gst-play.c | |
parent | 5df274f824b1ce493c66fb1a922c47f56cfbc7b2 (diff) | |
download | gstreamer-plugins-base-2aa26a9807c25c0f5f4515ccff2409bc6a21e95a.tar.gz |
gst-play: Handle CLOCK_LOST message
It is necessary for playbin gapless playback when switching
between audio-only and video-only files for example.
Diffstat (limited to 'tools/gst-play.c')
-rw-r--r-- | tools/gst-play.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c index 6051cbbd0..ca3a0c8b0 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -210,6 +210,12 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) } break; } + case GST_MESSAGE_CLOCK_LOST:{ + g_print (_("Clock lost, selecting a new one\n")); + gst_element_set_state (play->playbin, GST_STATE_PAUSED); + gst_element_set_state (play->playbin, GST_STATE_PLAYING); + break; + } case GST_MESSAGE_LATENCY: g_print ("Redistribute latency...\n"); gst_bin_recalculate_latency (GST_BIN (play->playbin)); |