diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-09-09 23:35:23 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-15 20:25:07 +0400 |
commit | 3b4bb19e63b41a0a542ba3ef254443b2e76a6a3e (patch) | |
tree | 8a4168cce911a68fa1f807881a9a9cd240f663ca /libavformat/utils.c | |
parent | 0c270239c2acec8cf2f3924e2b956e15a41e8d1c (diff) |
lavf: flush the output AVIOContext in av_write_trailer().
This is consistent with stdio and is what we want to do in all cases.
Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index b555ad0ff7..b5b49c93c4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3270,6 +3270,10 @@ int av_write_trailer(AVFormatContext *s) if (s->oformat->write_trailer) ret = s->oformat->write_trailer(s); + + if (!(s->oformat->flags & AVFMT_NOFILE)) + avio_flush(s->pb); + fail: for (i = 0; i < s->nb_streams; i++) { av_freep(&s->streams[i]->priv_data); |