diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c index a790410f65..fef76be7c6 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c @@ -86,6 +86,8 @@ gst_adaptive_demux2_stream_init (GstAdaptiveDemux2Stream * stream) stream->last_ret = GST_FLOW_OK; stream->next_input_wakeup_time = GST_CLOCK_STIME_NONE; + stream->recommended_buffering_threshold = GST_CLOCK_TIME_NONE; + stream->fragment_bitrates = g_malloc0 (sizeof (guint64) * NUM_LOOKBACK_FRAGMENTS); diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c index fc12024d99..1a7503be52 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c @@ -2547,7 +2547,7 @@ gst_hls_media_playlist_recommended_buffering_threshold (GstHLSMediaPlaylist * && threshold > playlist->hold_back) threshold = playlist->hold_back; else if (GST_CLOCK_TIME_IS_VALID (playlist->targetduration) - && threshold > playlist->targetduration) + && threshold > 3 * playlist->targetduration) threshold = 3 * playlist->targetduration; if (low_latency) { @@ -2555,7 +2555,7 @@ gst_hls_media_playlist_recommended_buffering_threshold (GstHLSMediaPlaylist * && threshold > playlist->part_hold_back) threshold = playlist->part_hold_back; else if (GST_CLOCK_TIME_IS_VALID (playlist->partial_targetduration) - && threshold > playlist->partial_targetduration) + && threshold > 3 * playlist->partial_targetduration) threshold = 3 * playlist->partial_targetduration; } }