mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 02:53:05 +00:00
Fix brown-paper-bag bug in audio init error checking
This commit is contained in:
parent
0792157e9d
commit
0a0be19b69
@ -149,6 +149,7 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
// Try to release the AudioTrack if we got far enough
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if (track != null) {
|
||||
track.release();
|
||||
@ -158,6 +159,11 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
if (track == null) {
|
||||
// Couldn't create any audio track for playback
|
||||
return -2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user