From: Sebastian Dröge Date: Wed, 11 Jan 2012 13:10:46 +0000 (+0100) Subject: souphttpsrc: Fix buffer handling X-Git-Tag: 1.19.3~509^2~7423 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3c8c4f8b0af4120131eb7b80babd7124c77efa8;p=platform%2Fupstream%2Fgstreamer.git souphttpsrc: Fix buffer handling souphttpsrc is now usable again and doesn't crash anymore whenever something is read from a HTTP connection. --- diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 85587d17a7..42723ee4b0 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;