summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ashley <bugzilla@ashley-family.net>2019-02-05 17:10:03 +0000
committerTim-Philipp Müller <tim@centricular.com>2019-02-19 17:55:13 +0000
commitdbe0a8cbc3d29d4ef4cc1d5cb2ae01b777d57078 (patch)
tree25945ea921cf424bcc7047eaf4c14b8c33ad895d
parent2d806477d0b21ca273d43ed67f6fd8ea00c36170 (diff)
downloadgstreamer-plugins-bad-dbe0a8cbc3d29d4ef4cc1d5cb2ae01b777d57078.tar.gz
curlhttpsrc: set BUFFER_OFFSET when creating GstBuffer
To make curlhttpsrc behave more like souphttpsrc, set the BUFFER_OFFSET in its output buffers to match the segment start. This means that in a HTTP RANGE request, the BUFFER_OFFSET will match the value in the RANGE request.
-rw-r--r--ext/curl/gstcurlhttpsrc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/curl/gstcurlhttpsrc.c b/ext/curl/gstcurlhttpsrc.c
index 3f151a7f4..274bfed9b 100644
--- a/ext/curl/gstcurlhttpsrc.c
+++ b/ext/curl/gstcurlhttpsrc.c
@@ -979,6 +979,7 @@ retry:
src->buffer_len, src->uri);
*outbuf = gst_buffer_new_allocate (NULL, src->buffer_len, NULL);
gst_buffer_fill (*outbuf, 0, src->buffer, src->buffer_len);
+ GST_BUFFER_OFFSET (*outbuf) = basesrc->segment.position;
g_free (src->buffer);
src->buffer = NULL;