Fix the double-free bug and disable double free debugging.

This commit is contained in:
Cameron Gutman 2013-11-21 13:05:01 -05:00
parent acb3dc8881
commit 9e4364f672
4 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ public class AvByteBufferPool {
private ConcurrentLinkedQueue<byte[]> bufferList = new ConcurrentLinkedQueue<byte[]>();
private int bufferSize;
private static final boolean doubleFreeDebug = true;
private static final boolean doubleFreeDebug = false;
public AvByteBufferPool(int size)
{

View File

@ -5,7 +5,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
public class AvObjectPool<T> {
private ConcurrentLinkedQueue<T> objectList = new ConcurrentLinkedQueue<T>();
private static final boolean doubleFreeDebug = true;
private static final boolean doubleFreeDebug = false;
public void purge()
{

View File

@ -6,7 +6,7 @@ public class AvShortBufferPool {
private ConcurrentLinkedQueue<short[]> bufferList = new ConcurrentLinkedQueue<short[]>();
private int bufferSize;
private static final boolean doubleFreeDebug = true;
private static final boolean doubleFreeDebug = false;
public AvShortBufferPool(int size)
{

View File

@ -125,7 +125,7 @@ public class AvVideoDepacketizer {
}
// Construct the H264 decode unit
AvDecodeUnit du = AvDecodeUnit.newDecodeUnit(AvDecodeUnit.TYPE_H264, avcNalDataChain, avcNalDataLength, flags);
AvDecodeUnit du = AvDecodeUnit.newDecodeUnit(AvDecodeUnit.TYPE_H264, new LinkedList<AvByteBufferDescriptor>(avcNalDataChain), avcNalDataLength, flags);
if (!decodedUnits.offer(du))
{
releaseDecodeUnit(du);