fix C2 may not send during rtmp handshake

camera2
Leonew 8 years ago
parent e2828e1594
commit 3d2428a1f9

@ -94,6 +94,7 @@ public class RtmpConnection implements RtmpPublisher {
handshake.readS0(in);
handshake.readS1(in);
handshake.writeC2(out);
out.flush();
handshake.readS2(in);
}

@ -162,7 +162,7 @@ public final class Handshake {
/** Generates and writes the third handshake packet (C2) */
public final void writeC2(OutputStream out) throws IOException {
Log.d(TAG, "readC2");
Log.d(TAG, "writeC2");
// C2 is an echo of S1
if (s1 == null) {
throw new IllegalStateException("C2 cannot be written without S1 being read first");

Loading…
Cancel
Save