mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-31 10:45:08 +00:00
adaptivedemux: Don't calculate bitrate for header/index fragments
They are generally substantially smaller than regular fragments, and therefore
we end up pushing totally wrong bitrates downstream.
Fixes erratic buffering issues with DASH introduced by
66f5e87435
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1786>
This commit is contained in:
parent
a4b20ed276
commit
e700a21993
|
@ -2773,7 +2773,8 @@ gst_adaptive_demux_eos_handling (GstAdaptiveDemuxStream * stream)
|
||||||
/* Last chance to figure out a fallback nominal bitrate if neither baseclass
|
/* Last chance to figure out a fallback nominal bitrate if neither baseclass
|
||||||
nor the HTTP Content-Length implementation worked. */
|
nor the HTTP Content-Length implementation worked. */
|
||||||
if (stream->fragment.bitrate == 0 && stream->fragment.duration != 0 &&
|
if (stream->fragment.bitrate == 0 && stream->fragment.duration != 0 &&
|
||||||
stream->fragment_bytes_downloaded != 0) {
|
stream->fragment_bytes_downloaded != 0 && !stream->downloading_index &&
|
||||||
|
!stream->downloading_header) {
|
||||||
guint bitrate = MIN (G_MAXUINT,
|
guint bitrate = MIN (G_MAXUINT,
|
||||||
gst_util_uint64_scale (stream->fragment_bytes_downloaded,
|
gst_util_uint64_scale (stream->fragment_bytes_downloaded,
|
||||||
8 * GST_SECOND, stream->fragment.duration));
|
8 * GST_SECOND, stream->fragment.duration));
|
||||||
|
|
Loading…
Reference in a new issue