gst/tcp/gstmultifdsink.c: Don't leak GDP headers when using GDP mode (i.e. tcpservers...
authorMichael Smith <msmith@xiph.org>
Mon, 14 Nov 2005 18:47:54 +0000 (18:47 +0000)
committerMichael Smith <msmith@xiph.org>
Mon, 14 Nov 2005 18:47:54 +0000 (18:47 +0000)
Original commit message from CVS:
* gst/tcp/gstmultifdsink.c: (gst_multifdsink_client_queue_data),
(gst_multifdsink_render):
Don't leak GDP headers when using GDP mode (i.e. tcpserversink).

ChangeLog
gst/tcp/gstmultifdsink.c

index d393177442b15e7cd9602db5a6ba0bbf4622eab9..217828cede2a6406be0c1897619a44ce4df25d83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-14  Michael Smith <msmith@fluendo.com>
+
+       * gst/tcp/gstmultifdsink.c: (gst_multifdsink_client_queue_data),
+       (gst_multifdsink_render):
+         Don't leak GDP headers when using GDP mode (i.e. tcpserversink).
+
 2005-11-14  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/playback/gstplaybin.c: (gen_audio_element):
index a3ebccd5bc1421f0f62a1ffee5bc8fd09c5f621e..930487e82d57cdf62a1237b039e00f4dc4f16c1b 100644 (file)
@@ -770,6 +770,9 @@ gst_multifdsink_handle_client_read (GstMultiFdSink * sink,
   return ret;
 }
 
+/* Queue raw data, creating a new buffer. This takes ownership of the data by
+ * setting it as GST_BUFFER_MALLOCDATA() on the created buffer
+ */
 static gboolean
 gst_multifdsink_client_queue_data (GstMultiFdSink * sink, GstTCPClient * client,
     gchar * data, gint len)
@@ -778,6 +781,7 @@ gst_multifdsink_client_queue_data (GstMultiFdSink * sink, GstTCPClient * client,
 
   buf = gst_buffer_new ();
   GST_BUFFER_DATA (buf) = (guint8 *) data;
+  GST_BUFFER_MALLOCDATA (buf) = (guint8 *) data;
   GST_BUFFER_SIZE (buf) = len;
 
   GST_LOG_OBJECT (sink, "[fd %5d] queueing data of length %d",
@@ -1509,6 +1513,7 @@ gst_multifdsink_render (GstBaseSink * bsink, GstBuffer * buf)
     g_slist_free (sink->streamheader);
     sink->streamheader = NULL;
   }
+
   /* if the incoming buffer is marked as IN CAPS, then we assume for now
    * it's a streamheader that needs to be sent to each new client, so we
    * put it on our internal list of streamheader buffers.