Ignore invalid RTP-Info header value.

Issue: google/ExoPlayer#9619

(and a few other GH issues related to invalid RTP-Info header)

PiperOrigin-RevId: 423283017
This commit is contained in:
claincly 2022-01-21 11:34:17 +00:00 committed by Ian Baker
parent 5a60db3328
commit cd076f7622
2 changed files with 14 additions and 5 deletions

View File

@ -110,6 +110,8 @@
([#9800](https://github.com/google/ExoPlayer/issues/9800)). ([#9800](https://github.com/google/ExoPlayer/issues/9800)).
* Handle when RTSP track timing is not available * Handle when RTSP track timing is not available
([#9775](https://github.com/google/ExoPlayer/issues/9775)). ([#9775](https://github.com/google/ExoPlayer/issues/9775)).
* Ignores invalid RTP-Info header values
([#9619](https://github.com/google/ExoPlayer/issues/9619)).
* Cast extension * Cast extension
* Fix bug that prevented `CastPlayer` from calling `onIsPlayingChanged` * Fix bug that prevented `CastPlayer` from calling `onIsPlayingChanged`
correctly ([#9792](https://github.com/google/ExoPlayer/issues/9792)). correctly ([#9792](https://github.com/google/ExoPlayer/issues/9792)).

View File

@ -619,11 +619,18 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
startTimingString == null startTimingString == null
? RtspSessionTiming.DEFAULT ? RtspSessionTiming.DEFAULT
: RtspSessionTiming.parseTiming(startTimingString); : RtspSessionTiming.parseTiming(startTimingString);
@Nullable String rtpInfoString = response.headers.get(RtspHeaders.RTP_INFO);
ImmutableList<RtspTrackTiming> trackTimingList = ImmutableList<RtspTrackTiming> trackTimingList;
rtpInfoString == null try {
? ImmutableList.of() @Nullable String rtpInfoString = response.headers.get(RtspHeaders.RTP_INFO);
: RtspTrackTiming.parseTrackTiming(rtpInfoString, uri); trackTimingList =
rtpInfoString == null
? ImmutableList.of()
: RtspTrackTiming.parseTrackTiming(rtpInfoString, uri);
} catch (ParserException e) {
trackTimingList = ImmutableList.of();
}
onPlayResponseReceived(new RtspPlayResponse(response.status, timing, trackTimingList)); onPlayResponseReceived(new RtspPlayResponse(response.status, timing, trackTimingList));
break; break;