summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-01-17 15:10:42 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-01-17 15:13:15 +0100
commit2aa26a9807c25c0f5f4515ccff2409bc6a21e95a (patch)
tree16a1f0139c3ec43bfdf8e2ebb118499c30338975 /tools
parent5df274f824b1ce493c66fb1a922c47f56cfbc7b2 (diff)
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')
-rw-r--r--tools/gst-play.c6
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));