Skip to content

Commit 631c141

Browse files
committed
fix: make udpAudio reference effectively final for lambda
- capture udpAudio into final local variable before lambda capture
1 parent 0e7570b commit 631c141

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/com/openipc/decoder/Decoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,9 +1088,10 @@ private void rtspConnect() throws Exception {
10881088
if (mType) {
10891089
mUdpSocket = udpVideo;
10901090
mUdpAudioSocket = udpAudio;
1091+
final DatagramSocket audioSock = udpAudio;
10911092
try {
10921093
Thread audioRx = new Thread(() -> {
1093-
try { udpStream(udpAudio); } catch (IOException ignored) {}
1094+
try { udpStream(audioSock); } catch (IOException ignored) {}
10941095
}, "rtsp-udp-audio");
10951096
audioRx.start();
10961097
udpStream(udpVideo);

0 commit comments

Comments
 (0)