[vlc-commits] demux: adaptive: only use segments for bw estimation
Francois Cartegnie
git at videolan.org
Tue Mar 2 23:45:00 UTC 2021
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Feb 27 19:52:18 2021 +0100| [152883b6980fb7f6369c16a69e2bc1d65a7e120a] | committer: Francois Cartegnie
demux: adaptive: only use segments for bw estimation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=152883b6980fb7f6369c16a69e2bc1d65a7e120a
---
modules/demux/adaptive/http/Chunk.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index 447072e5fb..b138b26f9c 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -225,7 +225,7 @@ block_t * HTTPChunkSource::read(size_t readsize)
consumed += p_block->i_buffer;
if((size_t)ret < readsize)
eof = true;
- if(ret && time)
+ if(ret && time && type == ChunkType::Segment)
connManager->updateDownloadRate(sourceid, p_block->i_buffer, time);
}
@@ -402,7 +402,7 @@ void HTTPChunkBufferedSource::bufferize(size_t readsize)
}
}
- if(rate.size && rate.time)
+ if(rate.size && rate.time && type == ChunkType::Segment)
{
connManager->updateDownloadRate(sourceid, rate.size, rate.time);
}
More information about the vlc-commits
mailing list