diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-01-16 14:48:46 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-01-16 14:51:11 -0500 |
commit | e82e434730ed46f8f52884354f4bd847c4b61d2a (patch) | |
tree | 126ba03446d3b928ad39c3c0cb20a9d0adcc16c5 /sys | |
parent | c9fbf274f43e8e5265dda388f888815da51dd51a (diff) | |
download | gstreamer-plugins-bad-e82e434730ed46f8f52884354f4bd847c4b61d2a.tar.gz |
uvch264: Prevent temporary elements from going to playing
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvch264/gstuvch264_src.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/uvch264/gstuvch264_src.c b/sys/uvch264/gstuvch264_src.c index 6901131fc..388e519ed 100644 --- a/sys/uvch264/gstuvch264_src.c +++ b/sys/uvch264/gstuvch264_src.c @@ -29,7 +29,7 @@ */ #ifdef HAVE_CONFIG_H -# include <config.h> +#include <config.h> #endif #include "gstuvch264_src.h" @@ -2189,7 +2189,7 @@ _transform_caps (GstUvcH264Src * self, GstCaps * caps, const gchar * name) GstPad *sink; GstCaps *out_caps = NULL; - if (!el || !cf || !fs || !gst_bin_add (GST_BIN (self), el)) { + if (!el || !cf || !fs) { if (el) gst_object_unref (el); if (cf) @@ -2198,6 +2198,17 @@ _transform_caps (GstUvcH264Src * self, GstCaps * caps, const gchar * name) gst_object_unref (fs); goto done; } + + gst_element_set_locked_state (el, TRUE); + gst_element_set_locked_state (cf, TRUE); + gst_element_set_locked_state (fs, TRUE); + + if (!gst_bin_add (GST_BIN (self), el)) { + gst_object_unref (el); + gst_object_unref (cf); + gst_object_unref (fs); + goto done; + } if (!gst_bin_add (GST_BIN (self), cf)) { gst_object_unref (cf); gst_object_unref (fs); |