aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/empathy-video-src.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c
index bfff30d18..1e362547a 100644
--- a/src/empathy-video-src.c
+++ b/src/empathy-video-src.c
@@ -426,6 +426,7 @@ empathy_video_src_set_resolution (GstElement *src,
{
EmpathyGstVideoSrcPrivate *priv = EMPATHY_GST_VIDEO_SRC_GET_PRIVATE (src);
GstCaps *caps;
+ GstClock *gst_clock;
g_return_if_fail (priv->capsfilter != NULL);
@@ -442,6 +443,13 @@ empathy_video_src_set_resolution (GstElement *src,
g_object_set (priv->capsfilter, "caps", caps, NULL);
+ /* Reset clock an base time, this is require for videotestsrc and hopefully
+ * has no side effect */
+ gst_clock = gst_element_get_clock (src);
+ gst_element_set_clock (priv->src, gst_clock);
+ gst_element_set_base_time (priv->src, gst_element_get_base_time (src));
+ gst_object_unref (gst_clock);
+
gst_element_set_locked_state (priv->src, FALSE);
gst_element_sync_state_with_parent (priv->src);
}