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.
This commit is contained in:
Alex Ashley 2019-02-05 17:10:03 +00:00 committed by Tim-Philipp Müller
parent 2d806477d0
commit dbe0a8cbc3

View file

@ -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;