Reassemble NAL's early

This commit is contained in:
Iwan Timmer 2014-02-03 00:30:44 +01:00
parent 8ca3aab363
commit ae18e00b13

View File

@ -193,6 +193,10 @@ public class VideoDepacketizer {
// Add a buffer descriptor describing the NAL data in this packet // Add a buffer descriptor describing the NAL data in this packet
avcNalDataChain.add(data); avcNalDataChain.add(data);
avcNalDataLength += location.offset-start; avcNalDataLength += location.offset-start;
// Reassemble the NALs if this was the last packet for this frame
if (packet.getPacketIndex() + 1 == packet.getTotalPackets())
reassembleAvcNal();
} }
} }
} }