aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2011-07-12 05:01:45 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-11-08 04:07:19 +0800
commit6fd0f2618c54d9300cd633c954b69f1d3d6e4197 (patch)
treed33d30523bd14b93b10fa8f721510b5812861dbb /src
parent21a7183c58bf6ca3bb9b207b400de91a42d5bcd0 (diff)
downloadgsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar.gz
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar.bz2
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar.lz
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar.xz
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.tar.zst
gsoc2013-empathy-6fd0f2618c54d9300cd633c954b69f1d3d6e4197.zip
Reset clock after changing video resolution
This workaround issue with videotestsrc when the test src does not have a a clock after going to NULL state while changing resolution.
Diffstat (limited to 'src')
-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);
}