From 342377e69ae3157c0b11a03d32721b80844a0b7b Mon Sep 17 00:00:00 2001 From: kapodamy Date: Wed, 29 Jan 2020 16:04:24 -0300 Subject: [PATCH] restore offset after writting lastest CTTS entries --- .../org/schabi/newpipe/streams/Mp4FromDashWriter.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java index 963d84b40..3dfba8b2d 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java @@ -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;