summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-08 13:31:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-08 13:31:12 +0200
commita286940da148ac940bba515598bff2e01830cb57 (patch)
treea7e7bcb0b8e2c15bcaa67d8ae12f84e6da9dfb84 /libavformat
parentad6a50c0ed39d30f3acbe57c29df8119e1379a3c (diff)
mux: also call avio_flush() when flushing the muxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 29ab3f5dc2..1153ab69a8 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -508,6 +508,8 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
if (!pkt) {
if (s->oformat->flags & AVFMT_ALLOW_FLUSH) {
ret = s->oformat->write_packet(s, NULL);
+ if (s->flush_packets && s->pb && s->pb->error >= 0)
+ avio_flush(s->pb);
if (ret >= 0 && s->pb && s->pb->error < 0)
ret = s->pb->error;
return ret;