rtspclientsink: Don't leave stale pointer after unref
authorJan Schmidt <jan@centricular.com>
Wed, 30 Nov 2016 03:06:36 +0000 (14:06 +1100)
committerJan Schmidt <jan@centricular.com>
Wed, 30 Nov 2016 10:15:12 +0000 (21:15 +1100)
Fix a warning on shutdown - don't keep a pointer to an
alread-unreffed object.

gst/rtsp-sink/gstrtspclientsink.c

index 88a5964..b2aaec8 100644 (file)
@@ -1559,8 +1559,10 @@ gst_rtsp_client_sink_cleanup (GstRTSPClientSink * sink)
       context->stream = NULL;
     }
 
-    if (context->srtcpparams)
+    if (context->srtcpparams) {
       gst_caps_unref (context->srtcpparams);
+      context->srtcpparams = NULL;
+    }
     g_free (context->conninfo.location);
     context->conninfo.location = NULL;
   }