Skip to content

Commit

Permalink
Merge pull request #3 from irtimmer/direct_decode
Browse files Browse the repository at this point in the history
Reassemble NAL's early
  • Loading branch information
cgutman committed Feb 17, 2014
2 parents 1a38cc2 + ae18e00 commit d54c1b0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ public void addInputData(VideoPacket packet)
// Add a buffer descriptor describing the NAL data in this packet
avcNalDataChain.add(data);
avcNalDataLength += location.offset-start;

// Reassemble the NALs if this was the last packet for this frame
if (packet.getPacketIndex() + 1 == packet.getTotalPackets())
reassembleAvcNal();
}
}
}
Expand Down

0 comments on commit d54c1b0

Please sign in to comment.