Commit a854362b authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent f7b24043
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment