这是indexloc提供的服务,不要输入任何密码
Skip to content

RTSP error not handled by Listener.onPlayerError, app crashes on invalid media #10165

@ArtRoman

Description

@ArtRoman

ExoPlayer Version

2.17.1

Devices that reproduce the issue

Any device, I think.
Reproduces on emulator with Android 11 (R) and Asus Tinkerboard with Android 7 (N).

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Start RTSP stream: rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov
Stream is missing some data because server was about to close starting this year, but URL is still accessible.

Expected result

RTSP stream is missing some data, so playback should stop, ExoException should raise via onPlayerError(PlaybackException error) if listener is set

Actual result

App crashes with error in log tagged by AndroidRuntime:

 FATAL EXCEPTION: ExoPlayer:Playback
 Process: *****, PID: 29242
 java.lang.IllegalArgumentException
 	at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
 	at com.google.android.exoplayer2.source.rtsp.RtspSessionTiming.parseTiming(RtspSessionTiming.java:66)
 	at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.onDescribeResponseReceived(RtspClient.java:683)
 	at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:598)
 	at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:507)
 	at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$com-google-android-exoplayer2-source-rtsp-RtspClient$MessageListener(RtspClient.java:500)
 	at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(Unknown Source:4)
 	at android.os.Handler.handleCallback(Handler.java:938)
 	at android.os.Handler.dispatchMessage(Handler.java:99)
 	at android.os.Looper.loop(Looper.java:223)
 	at android.os.HandlerThread.run(HandlerThread.java:67)

RtspSessionTiming.java:66 is

      checkArgument(stopTimeMs > startTimeMs);

both values are set to 0.

Media

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov

Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions