aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorGeek.Song <ffmpeg@gmail.com>2011-11-29 16:50:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-29 16:50:25 +0100
commit9cdf048ad2f66a26ca3e9c2d18f8daa986b4a146 (patch)
tree11bebcfc97843ec417095ead3a7ecd034cfb3dd8 /libavformat
parent313d30c18089e1f815274c735dbd5bdfbb8b9e2a (diff)
downloadffmpeg-9cdf048ad2f66a26ca3e9c2d18f8daa986b4a146.tar.gz
movenc: Remove unneeded chunkSize field from MOVIentry
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c7
-rw-r--r--libavformat/movenc.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d72ac4d714..5820af2189 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1811,15 +1811,17 @@ static void build_chunks(MOVTrack *trk)
{
int i;
MOVIentry *chunk= &trk->cluster[0];
+ uint64_t chunkSize = chunk->size;
chunk->chunkNum= 1;
trk->chunkCount= 1;
for(i=1; i<trk->entry; i++){
- if(chunk->pos + chunk->chunkSize == trk->cluster[i].pos){
- chunk->chunkSize += trk->cluster[i].size;
+ if(chunk->pos + chunkSize == trk->cluster[i].pos){
+ chunkSize += trk->cluster[i].size;
chunk->samplesInChunk += trk->cluster[i].entries;
}else{
trk->cluster[i].chunkNum = chunk->chunkNum+1;
chunk=&trk->cluster[i];
+ chunkSize = chunk->size;
trk->chunkCount++;
}
}
@@ -2092,7 +2094,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->cluster[trk->entry].pos = avio_tell(pb) - size;
trk->cluster[trk->entry].samplesInChunk = samplesInChunk;
- trk->cluster[trk->entry].chunkSize =
trk->cluster[trk->entry].size = size;
trk->cluster[trk->entry].entries = samplesInChunk;
trk->cluster[trk->entry].dts = pkt->dts;
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index b022f48b87..a5b6db9286 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -44,7 +44,6 @@ typedef struct MOVIentry {
uint64_t pos;
unsigned int samplesInChunk;
unsigned int chunkNum; ///< Chunk number if the current entry is a chunk start otherwise 0
- uint64_t chunkSize;
unsigned int entries;
int cts;
int64_t dts;