aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-10-02 23:56:40 +0200
committerMartin Storsjö <martin@martin.st>2012-10-04 13:52:09 +0300
commita854362b40f0e458db5a1fb0d2612a5702ee0ace (patch)
treeec8b074a1666c8af7a655e8a4fc03eb101f78139 /libavformat
parentf7b240434c015056bc6319ddbdb8483757cc13e2 (diff)
downloadffmpeg-a854362b40f0e458db5a1fb0d2612a5702ee0ace.tar.gz
segment: Flush buffered data before finishing a segment
This makes sure any buffered data is written to the segment, for muxers that buffer up data internally (e.g. fragmented mp4). Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/segment.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index bdb5254de4..fb5a22e6bc 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -111,6 +111,7 @@ static int segment_end(AVFormatContext *oc, int write_trailer)
{
int ret = 0;
+ av_write_frame(oc, NULL); /* Flush any buffered data */
if (write_trailer)
av_write_trailer(oc);
avio_close(oc->pb);