[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
Fri Apr 24 03:59:09 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=748316
--- Comment #9 from Stavros <stavrosv at digisoft.tv> ---
I want some feedback regarding the changes that needs to be done. Now, the
change of the hlsdemux is pretty straightforward. Next it's a diff with the
change
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index cd9ede9..bf4662f 100644
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -1191,7 +1191,7 @@ gst_m3u8_client_get_next_fragment (GstM3U8Client *
client,
if (range_start)
*range_start = file->offset;
if (range_end)
- *range_end = file->size != -1 ? file->offset + file->size - 1 : -1;
+ *range_end = file->size != -1 ? file->offset + file->size : -1;
if (key)
*key = file->key;
if (iv)
My question is regarding the change of the souphttpsrc. I made the following
change
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index ad87223..8d0d6cb 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -1907,7 +1907,7 @@ gst_soup_http_src_do_seek (GstBaseSrc * bsrc, GstSegment
* segment)
/* Wait for create() to handle the jump in offset. */
src->request_position = segment->start;
- src->stop_position = segment->stop;
+ src->stop_position = segment->stop - 1;
return TRUE;
}
I tested it with an HLS stream and the resulting stream is ok. I believe the
souphttpsrc is used by a number of other containers which needs to be tested. I
am not 100% if the solution above is the most appropriate, can you comment on
this.
Also, the changes and the patches for souphttpsrc should be captured on this
issue or another issue needs to be created?
--
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