summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-01-17 04:30:36 +0000
committerDavid Conrad <lessen42@gmail.com>2009-01-17 04:30:36 +0000
commit8a86aaa3b2e3a7c581048abd2b25ee43d3a92eb7 (patch)
treec08d0860d3bb7925a924a6a2f6587db2837f6efd /libavformat/matroskaenc.c
parent0d3d172f32a912d566a589d4085dbb08a7010ddd (diff)
Flush the buffer after writing the header and when done with writing the files
Fixes writing small (~4kb) files. Originally committed as revision 16650 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a6435d19fe..59016cab9f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -708,6 +708,7 @@ static int mkv_write_header(AVFormatContext *s)
if (mkv->cues == NULL)
return AVERROR(ENOMEM);
+ put_flush_packet(pb);
return 0;
}
@@ -888,6 +889,7 @@ static int mkv_write_trailer(AVFormatContext *s)
end_ebml_master(pb, mkv->segment);
av_free(mkv->md5_ctx);
+ put_flush_packet(pb);
return 0;
}