From 2aa26a9807c25c0f5f4515ccff2409bc6a21e95a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 17 Jan 2014 15:10:42 +0100 Subject: [PATCH] gst-play: Handle CLOCK_LOST message It is necessary for playbin gapless playback when switching between audio-only and video-only files for example. --- tools/gst-play.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/gst-play.c b/tools/gst-play.c index 6051cbbd00..ca3a0c8b00 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));