From 3c5eae63c039fa2957753fd8b482234b85c860d9 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 21 Feb 2017 20:08:21 +0900 Subject: [PATCH] hlsdemux: Try to find type at the end of a fragment hlsdemux tries to find type if given buffer size is large enought to find type (currently the threshold is 2KB), or EOS in some cases. However, since there can be small byte fragments such as WebVTT, demux should try to find type at the end of a fragment https://bugzilla.gnome.org/show_bug.cgi?id=779011 --- ext/hls/gsthlsdemux.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 574485b548..b75e600ca6 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -928,6 +928,13 @@ gst_hls_demux_finish_fragment (GstAdaptiveDemux * demux, } if (ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED) { + if (G_UNLIKELY (hls_stream->pending_typefind_buffer)) { + GstBuffer *buf = hls_stream->pending_typefind_buffer; + hls_stream->pending_typefind_buffer = NULL; + + gst_hls_demux_handle_buffer (demux, stream, buf, TRUE); + } + if (hls_stream->pending_pcr_buffer) { GstBuffer *buf = hls_stream->pending_pcr_buffer; hls_stream->pending_pcr_buffer = NULL;