Commit 2aadff2e authored by Maksym Veremeyenko's avatar Maksym Veremeyenko Committed by Michael Niedermayer

limit chunk size to 1GB

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f7a9b1de
......@@ -1948,7 +1948,8 @@ static void build_chunks(MOVTrack *trk)
chunk->chunkNum= 1;
trk->chunkCount= 1;
for(i=1; i<trk->entry; i++){
if(chunk->pos + chunkSize == trk->cluster[i].pos){
if(chunk->pos + chunkSize == trk->cluster[i].pos &&
chunkSize + trk->cluster[i].size < UINT32_MAX / 4){
chunkSize += trk->cluster[i].size;
chunk->samplesInChunk += trk->cluster[i].entries;
}else{
......
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