update WebMWriter.java
This commit is contained in:
parent
452977abdf
commit
b2d78d380b
|
@ -408,9 +408,10 @@ public class WebMWriter implements Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
private long makeCluster(final SharpStream stream, final long timecode, final long offset,
|
||||
private long makeCluster(final SharpStream stream, final long timecode, final long offsetStart,
|
||||
final boolean create) throws IOException {
|
||||
ClusterInfo cluster;
|
||||
long offset = offsetStart;
|
||||
|
||||
if (offset > 0) {
|
||||
// save the size of the previous cluster (maximum 256 MiB)
|
||||
|
@ -418,6 +419,8 @@ public class WebMWriter implements Closeable {
|
|||
cluster.size = (int) (written - offset - CLUSTER_HEADER_SIZE);
|
||||
}
|
||||
|
||||
offset = written;
|
||||
|
||||
if (create) {
|
||||
/* cluster */
|
||||
dump(new byte[]{0x1f, 0x43, (byte) 0xb6, 0x75}, stream);
|
||||
|
@ -435,11 +438,11 @@ public class WebMWriter implements Closeable {
|
|||
dump(encode(timecode, true), stream);
|
||||
}
|
||||
|
||||
return written;
|
||||
return offset;
|
||||
}
|
||||
|
||||
private void makeEBML(final SharpStream stream) throws IOException {
|
||||
// deafult values
|
||||
// default values
|
||||
dump(new byte[]{
|
||||
0x1A, 0x45, (byte) 0xDF, (byte) 0xA3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x42, (byte) 0x86, (byte) 0x81, 0x01,
|
||||
|
|
Loading…
Reference in New Issue