diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1ffc79a8cee7a52668629601df5ae02b25bd75a7..0097841e8109ae76e434e79aa2c9496f4e20f4ab 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1198,7 +1198,10 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
     uint8_t tosend    [RTMP_HANDSHAKE_PACKET_SIZE+1] = {
         3,                // unencrypted data
         0, 0, 0, 0,       // client uptime
-        0, 0, 0, 0,       // zeros
+        RTMP_CLIENT_VER1,
+        RTMP_CLIENT_VER2,
+        RTMP_CLIENT_VER3,
+        RTMP_CLIENT_VER4,
     };
     uint8_t clientdata[RTMP_HANDSHAKE_PACKET_SIZE];
     uint8_t serverdata[RTMP_HANDSHAKE_PACKET_SIZE+1];