Fix TrackOutput documentation for encryption data format

PiperOrigin-RevId: 309899166
This commit is contained in:
aquilescanta 2020-05-05 08:59:40 +01:00 committed by Oliver Woodman
parent fff3f99f4a
commit a8d1de5198
2 changed files with 5 additions and 5 deletions

View File

@ -120,11 +120,11 @@ public interface TrackOutput {
* encryption data also contains: * encryption data also contains:
* <ul> * <ul>
* <li>(2 bytes) {@code subsample_encryption_data_length}. * <li>(2 bytes) {@code subsample_encryption_data_length}.
* <li>({@code subsample_encryption_data_length} bytes) Subsample encryption data * <li>({@code subsample_encryption_data_length * 6} bytes) Subsample encryption data
* (repeated {@code subsample_encryption_data_length / 6} times: * (repeated {@code subsample_encryption_data_length} times:
* <ul> * <ul>
* <li>(3 bytes) Size of a clear section in sample. * <li>(2 bytes) Size of a clear section in sample.
* <li>(3 bytes) Size of an encryption section in sample. * <li>(4 bytes) Size of an encryption section in sample.
* </ul> * </ul>
* </ul> * </ul>
* </ul> * </ul>

View File

@ -1630,7 +1630,7 @@ public class FragmentedMp4Extractor implements Extractor {
// clearDataSize = clearHeaderSize (unsigned short) // clearDataSize = clearHeaderSize (unsigned short)
scratch.data[2] = (byte) ((clearHeaderSize >> 8) & 0xFF); scratch.data[2] = (byte) ((clearHeaderSize >> 8) & 0xFF);
scratch.data[3] = (byte) (clearHeaderSize & 0xFF); scratch.data[3] = (byte) (clearHeaderSize & 0xFF);
// encryptedDataSize = sampleSize (unsigned short) // encryptedDataSize = sampleSize (unsigned int)
scratch.data[4] = (byte) ((sampleSize >> 24) & 0xFF); scratch.data[4] = (byte) ((sampleSize >> 24) & 0xFF);
scratch.data[5] = (byte) ((sampleSize >> 16) & 0xFF); scratch.data[5] = (byte) ((sampleSize >> 16) & 0xFF);
scratch.data[6] = (byte) ((sampleSize >> 8) & 0xFF); scratch.data[6] = (byte) ((sampleSize >> 8) & 0xFF);