movenc: memset(0) new cluster elements after realloc()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent dae7ff0416
commit 4710993800
  1. 1
      libavformat/movenc.c

@ -2090,6 +2090,7 @@ 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;

Loading…
Cancel
Save