avformat: remove more unneeded avio_flush() calls

These instances are simply redundant or present because avio_flush() used to be
required before doing a seekback. That is no longer the case, aviobuf code does
the flush automatically on seek.

This only affects code which is either disabled for streaming IO contexts or
does no seekbacks after the flush, so this change should have no adverse effect
on streaming.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2020-01-04 21:14:46 +01:00
parent c371463915
commit f4a8ea7ff6
5 changed files with 0 additions and 13 deletions

View file

@ -863,13 +863,11 @@ static int gxf_write_trailer(AVFormatContext *s)
return ret;
gxf_write_flt_packet(s);
gxf_write_umf_packet(s);
avio_flush(pb);
/* update duration in all map packets */
for (i = 1; i < gxf->map_offsets_nb; i++) {
avio_seek(pb, gxf->map_offsets[i], SEEK_SET);
if ((ret = gxf_write_map_packet(s, 1)) < 0)
return ret;
avio_flush(pb);
}
avio_seek(pb, end, SEEK_SET);