Fix read H.264 in WebM when the NAL unit length field length is not 4.

This commit is contained in:
Oliver Woodman 2015-06-15 18:01:46 +01:00
parent 49f4fe7810
commit 854fa928fb

View File

@ -646,6 +646,7 @@ public final class WebmExtractor implements Extractor {
// Write a start code for the current NAL unit. // Write a start code for the current NAL unit.
nalStartCode.setPosition(0); nalStartCode.setPosition(0);
trackOutput.sampleData(nalStartCode, 4); trackOutput.sampleData(nalStartCode, 4);
sampleSize += nalUnitLengthFieldLengthDiff;
} else { } else {
// Write the payload of the NAL unit. // Write the payload of the NAL unit.
int writtenBytes = trackOutput.sampleData(input, sampleCurrentNalBytesRemaining); int writtenBytes = trackOutput.sampleData(input, sampleCurrentNalBytesRemaining);