hlsdemux: Adjust downstream buffer offsets
authorJan Schmidt <jan@centricular.com>
Mon, 7 Mar 2016 14:24:20 +0000 (01:24 +1100)
committerJan Schmidt <jan@centricular.com>
Wed, 3 Aug 2016 13:49:54 +0000 (23:49 +1000)
When fetching a byte-region from a server resource,
adjust the downstream buffer offsets so that downstream
doesn't know. This is because id3demux insists on the
first offset being 0. Later we might strip ID3 headers
entirely and this will be unneeded.

ext/hls/gsthlsdemux.c

index 3c600f3..1a5c610 100644 (file)
@@ -782,8 +782,7 @@ gst_hls_demux_data_received (GstAdaptiveDemux * demux,
   GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
 
   if (hls_stream->current_offset == -1)
-    hls_stream->current_offset =
-        GST_BUFFER_OFFSET_IS_VALID (buffer) ? GST_BUFFER_OFFSET (buffer) : 0;
+    hls_stream->current_offset = 0;
 
   /* Is it encrypted? */
   if (hls_stream->current_key) {