mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix RTSP payload timeout being too aggressive
This commit is contained in:
parent
ef8c49f135
commit
31d7f237eb
@ -88,8 +88,8 @@ public class RtspConnection {
|
|||||||
// Parse the response and determine whether it has a payload
|
// Parse the response and determine whether it has a payload
|
||||||
RtspResponse message = (RtspResponse) RtspParser.parseMessageNoPayload(byteBufferToString(responseHeader.array(), responseHeader.limit()));
|
RtspResponse message = (RtspResponse) RtspParser.parseMessageNoPayload(byteBufferToString(responseHeader.array(), responseHeader.limit()));
|
||||||
if (message.getOption("Content-Length") != null) {
|
if (message.getOption("Content-Length") != null) {
|
||||||
// The payload should immediately follow the header, so only wait another second
|
// The payload comes in a second packet
|
||||||
ByteBuffer responsePayload = enetConnection.readPacket(65536, 1000);
|
ByteBuffer responsePayload = enetConnection.readPacket(65536, RTSP_TIMEOUT);
|
||||||
message.setPayload(byteBufferToString(responsePayload.array(), responsePayload.limit()));
|
message.setPayload(byteBufferToString(responsePayload.array(), responsePayload.limit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user