[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
Wed Apr 22 12:03:01 PDT 2015


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

--- Comment #3 from Stavros <stavrosv at digisoft.tv> ---
Created attachment 302175
  --> https://bugzilla.gnome.org/attachment.cgi?id=302175&action=edit
Debug output of gst-launch-1.0

The debug_out.log is the debug output of the command

GST_DEBUG="hlsdemux:5,fragmented:7,filesrc:6,basesrc:6" ./bin/gst-launch-1.0
filesrc location=./stream/master.m3u8 ! hlsdemux ! filesink
location=out_stream.ts

The first segment has the following byterange values
#EXT-X-BYTERANGE:2199224 at 0

I didn't run it for all the file, but this includes the first segment. The
interesting part starts at the 0:00:00.026539515, where the basesrc receives
the seek event from the hlsdemux. The start of the segment is 0 and the stop is
2199223. Next at the 0:00:00.026958572, the gst_base_src_update_length is
called where a maxsize is calculated to 2199223 which is equals to the stop
segment. I believe this value should be 2199224, which is the size of the
segment as seen in the m3u8 file.

If you count all the occurences of gst_base_src_update_length for the first
segment and add the buffer size, you will see that's is -1 byte.

cat debug_out.log | grep gst_base_src_update_length | grep "segment.stop
2199223" | wc -l
537

It's 536 buffers with size 4096 bytes and one with 3767 bytes (see
0:00:01.379081420). If we do the math 536 * 4096 + 3767 = 2199223 != 2199224

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