encodebin: Fix refcount mishandling
authorThibault Saunier <tsaunier@igalia.com>
Thu, 30 Jul 2020 22:49:18 +0000 (18:49 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Sep 2020 01:24:14 +0000 (01:24 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/770>

gst/encoding/gstencodebin.c

index f0addaa..b8fb740 100644 (file)
@@ -1273,7 +1273,8 @@ setup_smart_encoder (GstEncodeBin * ebin, GstEncodingProfile * sprof,
 
   gst_bin_add_many (GST_BIN (reencoder_bin),
       gst_object_ref (encoder),
-      parser ? gst_object_ref (parser) : sgroup->smart_capsfilter,
+      parser ? gst_object_ref (parser) :
+      gst_object_ref (sgroup->smart_capsfilter),
       parser ? gst_object_ref (sgroup->smart_capsfilter) : NULL, NULL);
   if (!native_video) {
     convert = gst_element_factory_make ("videoconvert", NULL);