Fix memory leaks of special NAL sequences

This commit is contained in:
Cameron Gutman 2013-11-21 14:36:17 -05:00
parent d5f59bb972
commit e6959e66e4

View File

@ -189,6 +189,8 @@ public class AvVideoDepacketizer {
location.length--; location.length--;
location.offset++; location.offset++;
} }
specialSeq.free();
} }
// Move to the next special sequence // Move to the next special sequence
@ -207,8 +209,12 @@ public class AvVideoDepacketizer {
if (currentlyDecoding != AvDecodeUnit.TYPE_UNKNOWN || if (currentlyDecoding != AvDecodeUnit.TYPE_UNKNOWN ||
!NAL.isPadding(specialSeq)) !NAL.isPadding(specialSeq))
{ {
specialSeq.free();
break; break;
} }
else {
specialSeq.free();
}
} }
} }