gst-play: Handle CLOCK_LOST message

It is necessary for playbin gapless playback when switching
between audio-only and video-only files for example.
This commit is contained in:
Sebastian Dröge 2014-01-17 15:10:42 +01:00
parent 5df274f824
commit 2aa26a9807

View file

@ -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));