You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use this library to play an RTSP stream, it always throws an error:
java.lang.ArrayIndexOutOfBoundsException: length=228; index=228
at com.alexvas.utils.VideoCodecUtils.isAnyKeyFrame(VideoCodecUtils.kt:307)
at com.alexvas.rtsp.widget.RtspProcessor$proxyClientListener$1.onRtspVideoNalUnitReceived(RtspProcessor.kt:210)
at com.alexvas.rtsp.RtspClient.readRtpData(RtspClient.java:735)
at com.alexvas.rtsp.RtspClient.execute(RtspClient.java:542)
at com.alexvas.rtsp.widget.RtspProcessor$RtspThread.run(RtspProcessor.kt:348)
I am using your demo and have tried both software decoding, hardware decoding, and other Android devices; all of them result in errors.
I modify the code in VideoCodeUtils.kt (in 308): val nalUnitTypeOctet = data[nalUnitOffset]
to
val nalUnitTypeOctet = try {
data[nalUnitOffset]
} catch (e: ArrayIndexOutOfBoundsException) {
return false
}
it works well
The text was updated successfully, but these errors were encountered:
When I use this library to play an RTSP stream, it always throws an error:
java.lang.ArrayIndexOutOfBoundsException: length=228; index=228
at com.alexvas.utils.VideoCodecUtils.isAnyKeyFrame(VideoCodecUtils.kt:307)
at com.alexvas.rtsp.widget.RtspProcessor$proxyClientListener$1.onRtspVideoNalUnitReceived(RtspProcessor.kt:210)
at com.alexvas.rtsp.RtspClient.readRtpData(RtspClient.java:735)
at com.alexvas.rtsp.RtspClient.execute(RtspClient.java:542)
at com.alexvas.rtsp.widget.RtspProcessor$RtspThread.run(RtspProcessor.kt:348)
I am using your demo and have tried both software decoding, hardware decoding, and other Android devices; all of them result in errors.
I modify the code in VideoCodeUtils.kt (in 308): val nalUnitTypeOctet = data[nalUnitOffset]
to
val nalUnitTypeOctet = try {
data[nalUnitOffset]
} catch (e: ArrayIndexOutOfBoundsException) {
return false
}
it works well
The text was updated successfully, but these errors were encountered: