Permalink
Browse files

Put a log here for next time we get an Out of memory error here. When…

… demuxing a youtube video it errored out saying it was out of Heap Memory. After I put the log the error never happened again.
  • Loading branch information...
1 parent 6795d8f commit 25e616bcb07cd629e3cc36c23d6e0d14a215d857 @gubatron gubatron committed Dec 29, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/medialib/com/frostwire/mp4/AbstractBox.java
View
6 src/medialib/com/frostwire/mp4/AbstractBox.java
@@ -21,6 +21,8 @@
//import com.coremedia.iso.Hex;
//import com.coremedia.iso.IsoFile;
//import com.coremedia.iso.IsoTypeWriter;
+import android.util.Log;
+
import com.frostwire.mp4.boxes.Box;
import com.frostwire.mp4.boxes.ContainerBox;
import com.frostwire.mp4.boxes.UserBox;
@@ -111,7 +113,9 @@ public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, lo
}
public void getBox(WritableByteChannel os) throws IOException {
- ByteBuffer bb = ByteBuffer.allocate(l2i(getSize()));
+ int intSize = l2i(getSize());
+ Log.i("FW.AbstractBox boxSize to allocate:",String.valueOf(intSize));
+ ByteBuffer bb = ByteBuffer.allocate(intSize);
getHeader(bb);
if (content == null) {
getContent(bb);

0 comments on commit 25e616b

Please sign in to comment.