- for (i=0;i<s->nb_streams;i++) {
- AVIStream *avist= s->streams[i]->priv_data;
- int64_t ix, pos;
-
- avi_stream2fourcc(tag, i, s->streams[i]->codec->codec_type);
- ix_tag[3] = '0' + i;
-
- /* Writing AVI OpenDML leaf index chunk */
- ix = avio_tell(pb);
- ffio_wfourcc(pb, ix_tag); /* ix?? */
- avio_wl32(pb, avist->indexes.entry * 8 + 24);
- /* chunk size */
- avio_wl16(pb, 2); /* wLongsPerEntry */
- avio_w8(pb, 0); /* bIndexSubType (0 == frame index) */
- avio_w8(pb, 1); /* bIndexType (1 == AVI_INDEX_OF_CHUNKS) */
- avio_wl32(pb, avist->indexes.entry);
- /* nEntriesInUse */
- ffio_wfourcc(pb, tag); /* dwChunkId */
- avio_wl64(pb, avi->movi_list);/* qwBaseOffset */
- avio_wl32(pb, 0); /* dwReserved_3 (must be 0) */
-
- for (j=0; j<avist->indexes.entry; j++) {
- AVIIentry* ie = avi_get_ientry(&avist->indexes, j);
- avio_wl32(pb, ie->pos + 8);
- avio_wl32(pb, ((uint32_t)ie->len & ~0x80000000) |
+ for (i = 0; i < s->nb_streams; i++) {
+ AVIStream *avist = s->streams[i]->priv_data;
+ int64_t ix, pos;
+
+ avi_stream2fourcc(tag, i, s->streams[i]->codecpar->codec_type);
+ ix_tag[3] = '0' + i;
+
+ /* Writing AVI OpenDML leaf index chunk */
+ ix = avio_tell(pb);
+ ffio_wfourcc(pb, ix_tag); /* ix?? */
+ avio_wl32(pb, avist->indexes.entry * 8 + 24);
+ /* chunk size */
+ avio_wl16(pb, 2); /* wLongsPerEntry */
+ avio_w8(pb, 0); /* bIndexSubType (0 == frame index) */
+ avio_w8(pb, 1); /* bIndexType (1 == AVI_INDEX_OF_CHUNKS) */
+ avio_wl32(pb, avist->indexes.entry);
+ /* nEntriesInUse */
+ ffio_wfourcc(pb, tag); /* dwChunkId */
+ avio_wl64(pb, avi->movi_list); /* qwBaseOffset */
+ avio_wl32(pb, 0); /* dwReserved_3 (must be 0) */
+
+ for (j = 0; j < avist->indexes.entry; j++) {
+ AVIIentry *ie = avi_get_ientry(&avist->indexes, j);
+ avio_wl32(pb, ie->pos + 8);
+ avio_wl32(pb, ((uint32_t) ie->len & ~0x80000000) |