[Bug 748316] hlsdemux: The end offset (range_end) of a segment is not calculated properly in the m3u8 parser

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Apr 28 06:13:05 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=748316

--- Comment #23 from Thiago Sousa Santos <thiagossantos at gmail.com> ---
(In reply to Stavros from comment #22)
> Or, now I am thinking about it, you(@Thiago) mean something like the
> following
> 
> diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
> index ad87223..ff54c1e 100644
> --- a/ext/soup/gstsouphttpsrc.c
> +++ b/ext/soup/gstsouphttpsrc.c
> @@ -1345,13 +1345,14 @@ gst_soup_http_src_chunk_allocator (SoupMessage *
> msg, gsize max_len,
>    gsize length;
>    GstFlowReturn rc;
>    SoupGstChunk *chunk;
> +  gsize new_max_len = max_len - 1;
>  
> -  if (max_len)
> -    length = MIN (basesrc->blocksize, max_len);
> +  if (new_max_len)
> +    length = MIN (basesrc->blocksize, new_max_len);
>    else
>      length = basesrc->blocksize;
>    GST_DEBUG_OBJECT (src, "alloc %" G_GSIZE_FORMAT " bytes <= %"
> G_GSIZE_FORMAT,
> -      length, max_len);
> +      length, new_max_len);
>  
>    rc = GST_BASE_SRC_CLASS (parent_class)->alloc (basesrc, -1, length,
> &gstbuf);
>    if (G_UNLIKELY (rc != GST_FLOW_OK)) {

I was actually meaning we could update gst_soup_http_src_add_range_header to
subtract 1 when adding the header to the http request.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list