[0.11] gst-plugins-good: souphttpsrc: Fix buffer handling

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 11 05:11:29 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: e3c8c4f8b0af4120131eb7b80babd7124c77efa8
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=e3c8c4f8b0af4120131eb7b80babd7124c77efa8

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Jan 11 14:10:46 2012 +0100

souphttpsrc: Fix buffer handling

souphttpsrc is now usable again and doesn't crash anymore
whenever something is read from a HTTP connection.

---

 ext/soup/gstsouphttpsrc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index 85587d1..42723ee 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -933,6 +933,7 @@ gst_soup_http_src_got_chunk_cb (SoupMessage * msg, SoupBuffer * chunk,
 {
   GstBaseSrc *basesrc;
   guint64 new_position;
+  SoupGstChunk *gchunk;
 
   if (G_UNLIKELY (msg != src->msg)) {
     GST_DEBUG_OBJECT (src, "got chunk, but not for current message");
@@ -948,7 +949,8 @@ gst_soup_http_src_got_chunk_cb (SoupMessage * msg, SoupBuffer * chunk,
       chunk->length);
 
   /* Extract the GstBuffer from the SoupBuffer and set its fields. */
-  *src->outbuf = GST_BUFFER_CAST (soup_buffer_get_owner (chunk));
+  gchunk = (SoupGstChunk *) soup_buffer_get_owner (chunk);
+  *src->outbuf = gchunk->buffer;
 
   gst_buffer_resize (*src->outbuf, 0, chunk->length);
   GST_BUFFER_OFFSET (*src->outbuf) = basesrc->segment.position;



More information about the gstreamer-commits mailing list