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
This commit is contained in:
Seungha Yang 2017-02-21 20:08:21 +09:00 committed by Sebastian Dröge
parent a5e540bf55
commit 3c5eae63c0

View file

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