File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/reader Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -203,12 +203,11 @@ private void processAggregationPacket(ParsableByteArray data)
203
203
204
204
// Since sprop-max-don-diff != 0 is not supported, DONL won't present in the packet.
205
205
206
- int endOfData = data .bytesLeft ();
207
206
data .setPosition (2 ); // skipping payload header (2 bytes)
208
207
do {
209
208
short nalUnitSize = data .readShort (); // 2 bytes of NAL unit size
210
209
int nalHeaderType = (data .getData ()[data .getPosition ()] >> 1 ) & 0x3F ;
211
- if (data .getPosition () + nalUnitSize > endOfData ) {
210
+ if (data .bytesLeft () < nalUnitSize ) {
212
211
throw ParserException .createForMalformedManifest (
213
212
"Malformed Aggregation Packet. NAL unit size exceeds packet size." ,
214
213
/* cause= */ null
You can’t perform that action at this time.
0 commit comments