diff options
author | Edward Hervey <edward@centricular.com> | 2020-11-10 14:48:28 +0100 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-11-18 18:39:18 +0000 |
commit | 97301d2803612d04a227bbee1324c51dba9a8556 (patch) | |
tree | 7d3d6558a2f5537c815dc793e8d2235560cd6006 /gst-libs | |
parent | 73575c557cc1376221f0847e47e151ed8393bb6d (diff) | |
download | gstreamer-plugins-bad-97301d2803612d04a227bbee1324c51dba9a8556.tar.gz |
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
66f5e874352016e29f555e3ce693b23474e476db
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1818>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 8149a2ae7..e74a00981 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -2773,7 +2773,8 @@ gst_adaptive_demux_eos_handling (GstAdaptiveDemuxStream * stream) /* Last chance to figure out a fallback nominal bitrate if neither baseclass nor the HTTP Content-Length implementation worked. */ 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, gst_util_uint64_scale (stream->fragment_bytes_downloaded, 8 * GST_SECOND, stream->fragment.duration)); |