diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-05 02:45:22 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-08 04:07:19 +0800 |
commit | ab7098222f1b01f87956331ae7c1e095fbf1c9a5 (patch) | |
tree | 0ef25f65bacf466423cfbdeaeccbcfdaf6558bf1 /src | |
parent | b0438bff889500c7e9704233124fca7c572a7876 (diff) | |
download | gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar.gz gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar.bz2 gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar.lz gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar.xz gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.tar.zst gsoc2013-empathy-ab7098222f1b01f87956331ae7c1e095fbf1c9a5.zip |
Drop EOS from the src
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-video-src.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c index 9d0ee02c6..e2842114f 100644 --- a/src/empathy-video-src.c +++ b/src/empathy-video-src.c @@ -111,6 +111,11 @@ error: return NULL; } +static gboolean +empathy_video_src_drop_eos (GstPad *pad, GstEvent *event, gpointer user_data) +{ + return GST_EVENT_TYPE (event) != GST_EVENT_EOS; +} static void empathy_video_src_init (EmpathyGstVideoSrc *obj) @@ -135,6 +140,12 @@ empathy_video_src_init (EmpathyGstVideoSrc *obj) /* we need to save our source to priv->src */ priv->src = element; + /* Drop EOS events, so that our sinks don't get confused when we restart the + * source (triggering an EOS) */ + src = gst_element_get_static_pad (element, "src"); + gst_pad_add_event_probe (src, G_CALLBACK (empathy_video_src_drop_eos), NULL); + gst_object_unref (src); + /* videomaxrate is optional as it's part of gst-plugins-bad. So don't * fail if it doesn't exist. */ element_back = element; |