mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 19:42:45 +00:00
Revert an earlier commit that introduced a bug that caused initialization to crash
This commit is contained in:
parent
34905dd01e
commit
f672befaa7
@ -137,13 +137,12 @@ public class NvConnection {
|
||||
try {
|
||||
startSteamBigPicture();
|
||||
performHandshake();
|
||||
videoStream.setupVideoStream(host, video);
|
||||
videoStream.startVideoStream(host, video);
|
||||
audioStream.startAudioStream(host);
|
||||
beginControlStream();
|
||||
controlStream.startJitterPackets();
|
||||
startController();
|
||||
activity.hideSystemUi();
|
||||
videoStream.startVideoStream(host);
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
displayToast(e.getMessage());
|
||||
|
@ -144,18 +144,7 @@ public class NvVideoStream {
|
||||
decrend.setup(1280, 720, renderTarget);
|
||||
}
|
||||
|
||||
public void startVideoStream(final String host)
|
||||
{
|
||||
// Read the first frame to start the UDP video stream
|
||||
try {
|
||||
readFirstFrame(host);
|
||||
} catch (IOException e2) {
|
||||
abort();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void setupVideoStream(final String host, final Surface surface)
|
||||
public void startVideoStream(final String host, final Surface surface)
|
||||
{
|
||||
// This thread becomes the output display thread
|
||||
Thread t = new Thread() {
|
||||
@ -180,6 +169,17 @@ public class NvVideoStream {
|
||||
// the reference frame
|
||||
startUdpPingThread();
|
||||
|
||||
// Read the first frame to start the UDP video stream
|
||||
// This MUST be called before the normal UDP receive thread
|
||||
// starts in order to avoid state corruption caused by two
|
||||
// threads simultaneously adding input data.
|
||||
try {
|
||||
readFirstFrame(host);
|
||||
} catch (IOException e2) {
|
||||
abort();
|
||||
return;
|
||||
}
|
||||
|
||||
// Start the receive thread early to avoid missing
|
||||
// early packets
|
||||
startReceiveThread();
|
||||
|
Loading…
x
Reference in New Issue
Block a user