diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 15f0794..896ffa5 100644
|
a
|
b
|
static int avi_write_trailer(AVFormatContext *s)
|
| 636 | 636 | |
| 637 | 637 | for (i=0; i<s->nb_streams; i++) { |
| 638 | 638 | AVIStream *avist= s->streams[i]->priv_data; |
| | 639 | int dwSuggestedBufferSize = 0; |
| | 640 | for (j=0; j<avist->indexes.entry; j++) { |
| | 641 | AVIIentry* ie = avi_get_ientry(&avist->indexes, j); |
| | 642 | dwSuggestedBufferSize = FFMAX(dwSuggestedBufferSize, ie->len); |
| | 643 | } |
| | 644 | avio_seek(pb, avist->frames_hdr_strm + 4, SEEK_SET); |
| | 645 | avio_wl32(pb, dwSuggestedBufferSize); |
| 639 | 646 | for (j=0; j<avist->indexes.ents_allocated/AVI_INDEX_CLUSTER_SIZE; j++) |
| 640 | 647 | av_free(avist->indexes.cluster[j]); |
| 641 | 648 | av_freep(&avist->indexes.cluster); |