mkv: Flush the old cluster before writing a new one
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 18 Aug 2013 18:09:41 +0000 (20:09 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 19 Aug 2013 20:47:06 +0000 (22:47 +0200)
This simplifies keeping track of cluster boundaries for e.g.
livestreaming of WebM.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/matroskaenc.c

index ead0a82..51edce0 100644 (file)
@@ -1315,6 +1315,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
         mkv->cluster_pos = 0;
         if (mkv->dyn_bc)
             mkv_flush_dynbuf(s);
+        avio_flush(s->pb);
     }
 
     // check if we have an audio packet cached