Merge commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Aug 2013 09:30:46 +0000 (11:30 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Aug 2013 09:30:55 +0000 (11:30 +0200)
* commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe':
  mkv: Flush the old cluster before writing a new one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/matroskaenc.c

@@@ -1531,9 -1312,10 +1531,10 @@@ static int mkv_write_packet(AVFormatCon
                 " bytes, pts %" PRIu64 "dts %" PRIu64 "\n",
                 avio_tell(pb), pkt->pts, pkt->dts);
          end_ebml_master(pb, mkv->cluster);
 -        mkv->cluster_pos = 0;
 +        mkv->cluster_pos = -1;
          if (mkv->dyn_bc)
              mkv_flush_dynbuf(s);
+         avio_flush(s->pb);
      }
  
      // check if we have an audio packet cached