mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
uvch264: Prevent temporary elements from going to playing
This commit is contained in:
parent
c9fbf274f4
commit
e82e434730
1 changed files with 13 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue