Skip to content

Commit

Permalink
Added release note
Browse files Browse the repository at this point in the history
  • Loading branch information
microkatz committed Oct 31, 2024
1 parent 71bc177 commit 0e020f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
* DASH Extension:
* Smooth Streaming Extension:
* RTSP Extension:
* Fix crashing when parsing of RTP packets with header extensions
([#1225](https://github.com/androidx/media/pull/1225)).
* Decoder Extensions (FFmpeg, VP9, AV1, etc.):
* Add the MPEG-H decoder module which uses the native MPEG-H decoder
module to decode MPEG-H audio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static RtpPacket parse(ParsableByteArray packetBuffer) {
byte version = (byte) (firstByte >> 6);
boolean padding = ((firstByte >> 5) & 0x1) == 1;
byte csrcCount = (byte) (firstByte & 0xF);
boolean hasExtension = ((firstByte & 0x10) >> 4) == 1;
boolean hasExtension = ((firstByte >> 4) & 0x1) == 1;

if (version != RTP_VERSION) {
return null;
Expand Down Expand Up @@ -236,11 +236,11 @@ public static RtpPacket parse(ParsableByteArray packetBuffer) {

// Extension.
if (hasExtension) {
int headerExtensionProfileData = packetBuffer.readShort();
// Skip profile-defined data
packetBuffer.skipBytes(2);
int headerExtensionPayloadLength = packetBuffer.readShort();
if (headerExtensionPayloadLength != 0) {
byte[] extensionPayload = new byte[headerExtensionPayloadLength * 4];
packetBuffer.readBytes(extensionPayload, 0, headerExtensionPayloadLength * 4);
packetBuffer.skipBytes(headerExtensionPayloadLength * 4);
}
}

Expand Down

0 comments on commit 0e020f7

Please sign in to comment.