restore offset after writting lastest CTTS entries

This commit is contained in:
kapodamy 2020-01-29 16:04:24 -03:00
parent 9b71828b97
commit 342377e69a
1 changed files with 1 additions and 7 deletions

View File

@ -262,13 +262,6 @@ public class Mp4FromDashWriter {
final int ftyp_size = make_ftyp();
// reserve moov space in the output stream
/*if (outStream.canSetLength()) {
long length = writeOffset + auxSize;
// warning: setLength() does not fill the unused space with zeros
outStream.setLength(length);
outSeek(length);
} else {*/
if (auxSize > 0) {
int length = auxSize;
byte[] buffer = new byte[64 * 1024];// 64 KiB
@ -335,6 +328,7 @@ public class Mp4FromDashWriter {
if (sample == null) {
if (tablesInfo[i].ctts > 0 && sampleExtra[i] >= 0) {
writeEntryArray(tablesInfo[i].ctts, 1, sampleCount[i], sampleExtra[i]);// flush last entries
outRestore();
}
sampleIndex[i] = -1;
break;