mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 02:21:07 +00:00
Add workaround for missing last byte in RTSP message
Sometimes on android devices last byte is missing. This is link to this bug in Goggle Issue Tracker: https://issuetracker.google.com/issues/150758736?pli=1
This commit is contained in:
committed by
Cameron Gutman
parent
c8828d586c
commit
befc9805ab
@@ -175,6 +175,16 @@ int parseRtspMessage(PRTSP_MESSAGE msg, char* rtspMessage, int length) {
|
||||
|
||||
break;
|
||||
}
|
||||
else if (startsWith(endCheck, "\n\r") && endCheck[2] == '\0') {
|
||||
// Previous `if` statement already handle situation when two bytes are missing.
|
||||
// This is the workaround for the same problem, but for only one byte missing.
|
||||
// Sometimes on android emulators last byte or two bytes are missing.
|
||||
// This is link to this bug in Goggle Issue Tracker:
|
||||
// https://issuetracker.google.com/issues/150758736?pli=1
|
||||
messageEnded = true;
|
||||
|
||||
break;
|
||||
}
|
||||
else if (startsWith(endCheck, "\n\r\n")) {
|
||||
// We've encountered the end of the message - mark it thus
|
||||
messageEnded = true;
|
||||
|
||||
Reference in New Issue
Block a user