Commit 0068c678 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: adaptative: fix ondownload callback for truncated blocks

parent 0e621a7b
...@@ -218,10 +218,10 @@ size_t Stream::read(HTTPConnectionManager *connManager) ...@@ -218,10 +218,10 @@ size_t Stream::read(HTTPConnectionManager *connManager)
block->i_buffer = (size_t)ret; block->i_buffer = (size_t)ret;
adaptationLogic->updateDownloadRate(block->i_buffer, time); adaptationLogic->updateDownloadRate(block->i_buffer, time);
chunk->onDownload(&block);
if (chunk->getBytesToRead() == 0) if (chunk->getBytesToRead() == 0)
{ {
chunk->onDownload(&block);
chunk->getConnection()->releaseChunk(); chunk->getConnection()->releaseChunk();
currentChunk = NULL; currentChunk = NULL;
delete chunk; delete chunk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment