Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RTSP Mp4a-Latm #162

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Fix review comment in mp4a-latm Reader
Change-Id: I325a0ee1f6027f0f63233025d3357c1dc794b2ac
  • Loading branch information
rakeshnitb committed Oct 4, 2022
commit ca5bab5941d47501ae26e21c56405d14e7661adf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void consume(
if(fragmentedSampleSizeBytes > 0 && expectedSequenceNumber < sequenceNumber) {
outputSampleMetadataForFragmentedPackets();
}
int audioPayloadOffset = 0;
for (int subFrame = 0; subFrame < numberOfSubframes; subFrame++) {
int sampleLength = 0;

Expand All @@ -103,7 +102,7 @@ public void consume(
* one layer.
* Each subframe starts with a variable length encoding.
*/
for (; audioPayloadOffset < data.bytesLeft(); audioPayloadOffset++) {
while(data.getPosition() < data.limit()) {
int payloadMuxLength = data.readUnsignedByte();
sampleLength += payloadMuxLength;
if (payloadMuxLength != 0xff) {
Expand All @@ -113,7 +112,6 @@ public void consume(

// Write the audio sample
trackOutput.sampleData(data, sampleLength);
audioPayloadOffset+= sampleLength;
fragmentedSampleSizeBytes += sampleLength;
}
sampleTimeUsOfFragmentedSample = toSampleTimeUs(startTimeOffsetUs, timestamp,
Expand Down