Browse Source

limit chunk size to 1GB

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Maksym Veremeyenko Michael Niedermayer 14 years ago
parent
commit
2aadff2e44
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/movenc.c

+ 2
- 1
libavformat/movenc.c View File

@@ -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{


Loading…
Cancel
Save