Skip to content

Commit

Permalink
movenc: replace cluster memset by zeroing only the needed field.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Nov 30, 2011
1 parent 77af267 commit c863d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/movenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2090,11 +2090,11 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->cluster = av_realloc_f(trk->cluster, sizeof(*trk->cluster), (trk->entry + MOV_INDEX_CLUSTER_SIZE));
if (!trk->cluster)
return -1;
memset(trk->cluster + trk->entry, 0, sizeof(*trk->cluster)*MOV_INDEX_CLUSTER_SIZE);
}

trk->cluster[trk->entry].pos = avio_tell(pb) - size;
trk->cluster[trk->entry].samplesInChunk = samplesInChunk;
trk->cluster[trk->entry].chunkNum = 0;
trk->cluster[trk->entry].size = size;
trk->cluster[trk->entry].entries = samplesInChunk;
trk->cluster[trk->entry].dts = pkt->dts;
Expand Down

0 comments on commit c863d37

Please sign in to comment.