Skip to content

Commit

Permalink
Ignore invalid RTP-Info header value.
Browse files Browse the repository at this point in the history
Issue: #9619

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

PiperOrigin-RevId: 423283017
  • Loading branch information
claincly authored and icbaker committed Jan 25, 2022
1 parent 5a60db3 commit cd076f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
([#9800](https://github.com/google/ExoPlayer/issues/9800)).
* Handle when RTSP track timing is not available
([#9775](https://github.com/google/ExoPlayer/issues/9775)).
* Ignores invalid RTP-Info header values
([#9619](https://github.com/google/ExoPlayer/issues/9619)).
* Cast extension
* Fix bug that prevented `CastPlayer` from calling `onIsPlayingChanged`
correctly ([#9792](https://github.com/google/ExoPlayer/issues/9792)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,18 @@ private void handleRtspResponse(List<String> message) {
startTimingString == null
? RtspSessionTiming.DEFAULT
: RtspSessionTiming.parseTiming(startTimingString);
@Nullable String rtpInfoString = response.headers.get(RtspHeaders.RTP_INFO);
ImmutableList<RtspTrackTiming> trackTimingList =
rtpInfoString == null
? ImmutableList.of()
: RtspTrackTiming.parseTrackTiming(rtpInfoString, uri);

ImmutableList<RtspTrackTiming> trackTimingList;
try {
@Nullable String rtpInfoString = response.headers.get(RtspHeaders.RTP_INFO);
trackTimingList =
rtpInfoString == null
? ImmutableList.of()
: RtspTrackTiming.parseTrackTiming(rtpInfoString, uri);
} catch (ParserException e) {
trackTimingList = ImmutableList.of();
}

onPlayResponseReceived(new RtspPlayResponse(response.status, timing, trackTimingList));
break;

Expand Down

0 comments on commit cd076f7

Please sign in to comment.