Fixed several GIR warnings
[platform/upstream/gstreamer.git] / gst / rtsp-server / rtsp-stream.c
index 633ec55..c4b643c 100644 (file)
@@ -312,7 +312,7 @@ gst_rtsp_stream_get_index (GstRTSPStream * stream)
  *
  * Get the srcpad associated with @stream.
  *
- * Return: the srcpad. Unref after usage.
+ * Returns: (transfer full): the srcpad. Unref after usage.
  */
 GstPad *
 gst_rtsp_stream_get_srcpad (GstRTSPStream * stream)
@@ -328,7 +328,7 @@ gst_rtsp_stream_get_srcpad (GstRTSPStream * stream)
  *
  * Get the control string to identify this stream.
  *
- * Return: the control string. free after usage.
+ * Returns: (transfer full): the control string. free after usage.
  */
 gchar *
 gst_rtsp_stream_get_control (GstRTSPStream * stream)
@@ -391,7 +391,7 @@ gst_rtsp_stream_has_control (GstRTSPStream * stream, const gchar * control)
 
   g_mutex_lock (&priv->lock);
   if (priv->control)
-    res = g_strcmp0 (priv->control, control);
+    res = (g_strcmp0 (priv->control, control) == 0);
   else {
     guint streamid;
     sscanf (control, "stream=%u", &streamid);
@@ -730,12 +730,14 @@ gst_rtsp_stream_reserve_address (GstRTSPStream * stream,
 
   g_mutex_lock (&priv->lock);
   if (*addrp == NULL) {
+    GstRTSPAddressPoolResult res;
+
     if (priv->pool == NULL)
       goto no_pool;
 
-    *addrp = gst_rtsp_address_pool_reserve_address (priv->pool, address,
-        port, n_ports, ttl);
-    if (*addrp == NULL)
+    res = gst_rtsp_address_pool_reserve_address (priv->pool, address,
+        port, n_ports, ttl, addrp);
+    if (res != GST_RTSP_ADDRESS_POOL_OK)
       goto no_address;
   } else {
     if (strcmp ((*addrp)->address, address) ||
@@ -1074,7 +1076,7 @@ gst_rtsp_stream_get_server_port (GstRTSPStream * stream,
  *
  * Get the RTP session of this stream.
  *
- * Returns: The RTP session of this stream. Unref after usage.
+ * Returns: (transfer full): The RTP session of this stream. Unref after usage.
  */
 GObject *
 gst_rtsp_stream_get_rtpsession (GstRTSPStream * stream)