aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-01-04 19:31:14 +0100
committerMarton Balint <cus@passwd.hu>2020-01-07 21:51:45 +0100
commitc05d82fa92b38ac0459a0605872991d8fa9e2252 (patch)
tree763deec24366bffee5ca48c32694b35c82f7b868 /libavformat
parent4bf90e095b361cb11371921bf6eb357831d857b2 (diff)
downloadffmpeg-c05d82fa92b38ac0459a0605872991d8fa9e2252.tar.gz
avformat: remove unneeded avio_flush() calls from the end of write_trailer functions
The IO context is always flushed by libavformat/mux.c after write_trailer is called, so this change should have no effect at all.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiffenc.c2
-rw-r--r--libavformat/astenc.c1
-rw-r--r--libavformat/au.c1
-rw-r--r--libavformat/cafenc.c1
-rw-r--r--libavformat/flacenc.c1
-rw-r--r--libavformat/hashenc.c1
-rw-r--r--libavformat/mmf.c2
-rw-r--r--libavformat/mpegenc.c1
-rw-r--r--libavformat/soxenc.c2
-rw-r--r--libavformat/ttaenc.c1
-rw-r--r--libavformat/vc1testenc.c1
-rw-r--r--libavformat/wavenc.c2
-rw-r--r--libavformat/wtvenc.c2
13 files changed, 0 insertions, 18 deletions
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index ec2c7db09a..0145596bec 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -263,8 +263,6 @@ static int aiff_write_trailer(AVFormatContext *s)
file_size = avio_tell(pb);
avio_seek(pb, aiff->form, SEEK_SET);
avio_wb32(pb, file_size - aiff->form - 4);
-
- avio_flush(pb);
}
return ret;
diff --git a/libavformat/astenc.c b/libavformat/astenc.c
index d38a3aab38..e0b94b8b63 100644
--- a/libavformat/astenc.c
+++ b/libavformat/astenc.c
@@ -178,7 +178,6 @@ static int ast_write_trailer(AVFormatContext *s)
}
avio_seek(pb, file_size, SEEK_SET);
- avio_flush(pb);
}
return 0;
}
diff --git a/libavformat/au.c b/libavformat/au.c
index 19a0f56963..4afee85a94 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -326,7 +326,6 @@ static int au_write_trailer(AVFormatContext *s)
avio_seek(pb, 8, SEEK_SET);
avio_wb32(pb, (uint32_t)(file_size - au->header_size));
avio_seek(pb, file_size, SEEK_SET);
- avio_flush(pb);
}
return 0;
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 8fe1dcef19..98d4d9212f 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -258,7 +258,6 @@ static int caf_write_trailer(AVFormatContext *s)
avio_write(pb, caf->pkt_sizes, caf->size_entries_used);
caf->size_buffer_size = 0;
}
- avio_flush(pb);
}
av_freep(&caf->pkt_sizes);
return 0;
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index abbed38f89..1aae0c97e0 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -349,7 +349,6 @@ static int flac_write_trailer(struct AVFormatContext *s)
avio_seek(pb, 8, SEEK_SET);
avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
avio_seek(pb, file_size, SEEK_SET);
- avio_flush(pb);
} else {
av_log(s, AV_LOG_WARNING, "unable to rewrite FLAC header.\n");
}
diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c
index 34a8fd1f50..ddc67f53b5 100644
--- a/libavformat/hashenc.c
+++ b/libavformat/hashenc.c
@@ -152,7 +152,6 @@ static int hash_write_trailer(struct AVFormatContext *s)
av_hash_final_hex(c->hashes[i], buf + strlen(buf), sizeof(buf) - strlen(buf));
av_strlcatf(buf, sizeof(buf), "\n");
avio_write(s->pb, buf, strlen(buf));
- avio_flush(s->pb);
}
return 0;
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index 4e087fc920..e4768db064 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -171,8 +171,6 @@ static int mmf_write_trailer(AVFormatContext *s)
avio_write(pb, "\x00\x00\x00\x00", 4);
avio_seek(pb, pos, SEEK_SET);
-
- avio_flush(pb);
}
return 0;
}
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index f6980231a2..f8039a42c0 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1244,7 +1244,6 @@ static int mpeg_mux_end(AVFormatContext *ctx)
* it as it is usually not needed by decoders and because it
* complicates MPEG stream concatenation. */
// avio_wb32(ctx->pb, ISO_11172_END_CODE);
- // avio_flush(ctx->pb);
for (i = 0; i < ctx->nb_streams; i++) {
stream = ctx->streams[i]->priv_data;
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index 7259131b03..ce276f88b5 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -99,8 +99,6 @@ static int sox_write_trailer(AVFormatContext *s)
} else
avio_wb64(pb, num_samples);
avio_seek(pb, file_size, SEEK_SET);
-
- avio_flush(pb);
}
return 0;
diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c
index 73c29ae936..4860aab4c1 100644
--- a/libavformat/ttaenc.c
+++ b/libavformat/ttaenc.c
@@ -154,7 +154,6 @@ static int tta_write_trailer(AVFormatContext *s)
tta_queue_flush(s);
ff_ape_write_tag(s);
- avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index cf95d1d80d..1365bdd660 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -76,7 +76,6 @@ static int vc1test_write_trailer(AVFormatContext *s)
if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
avio_seek(pb, 0, SEEK_SET);
avio_wl24(pb, ctx->frames);
- avio_flush(pb);
}
return 0;
}
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index c44d6d26e9..ea7573139c 100644
--- a/libavformat/wavenc.c
+++ b/libavformat/wavenc.c
@@ -478,7 +478,6 @@ static int wav_write_trailer(AVFormatContext *s)
avio_wl32(pb, -1);
avio_seek(pb, file_size, SEEK_SET);
- avio_flush(pb);
}
}
@@ -605,7 +604,6 @@ static int w64_write_trailer(AVFormatContext *s)
}
avio_seek(pb, file_size, SEEK_SET);
- avio_flush(pb);
}
return 0;
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index 4a68b8133f..498bc64019 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -823,8 +823,6 @@ static int write_trailer(AVFormatContext *s)
avio_seek(pb, 0x5c, SEEK_SET);
avio_wl32(pb, file_end_pos >> WTV_SECTOR_BITS);
- avio_flush(pb);
-
av_free(wctx->sp_pairs);
av_free(wctx->st_pairs);
av_packet_unref(&wctx->thumbnail);