rtspclientsink: fix extra unref of custom payloader
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 26 Feb 2018 21:59:00 +0000 (22:59 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Mon, 26 Feb 2018 21:59:00 +0000 (22:59 +0100)
gst/rtsp-sink/gstrtspclientsink.c

index 040bfc6..090b056 100644 (file)
@@ -1239,7 +1239,8 @@ gst_rtsp_client_sink_setup_payloader (GstRTSPClientSink * sink, GstPad * pad,
 no_sinkpad:
   GST_ERROR_OBJECT (sink,
       "Could not find sink pad on payloader %" GST_PTR_FORMAT, payloader);
-  gst_object_unref (payloader);
+  if (!cspad->custom_payloader)
+    gst_object_unref (payloader);
   return FALSE;
 
 no_srcpad: