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>
pull/6/head
Martin Storsjö 12 years ago
parent f7b240434c
commit a854362b40
  1. 1
      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);

Loading…
Cancel
Save