Added release note

This commit is contained in:
microkatz 2024-10-31 12:20:50 +00:00
parent 71bc177e39
commit 0e020f778c
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -205,7 +205,7 @@ public final class RtpPacket {
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;
@ -236,11 +236,11 @@ public final class RtpPacket {
// 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);
}
}