Commit 177bcc95 authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Martin Storsjö
Browse files

rtmp: Pass the proper return code in rtmp_handshake


Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent bba287fd
......@@ -639,15 +639,16 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
return ret;
}
i = ffurl_read_complete(rt->stream, serverdata, RTMP_HANDSHAKE_PACKET_SIZE + 1);
if (i != RTMP_HANDSHAKE_PACKET_SIZE + 1) {
if ((ret = ffurl_read_complete(rt->stream, serverdata,
RTMP_HANDSHAKE_PACKET_SIZE + 1)) < 0) {
av_log(s, AV_LOG_ERROR, "Cannot read RTMP handshake response\n");
return AVERROR(EIO);
return ret;
}
i = ffurl_read_complete(rt->stream, clientdata, RTMP_HANDSHAKE_PACKET_SIZE);
if (i != RTMP_HANDSHAKE_PACKET_SIZE) {
if ((ret = ffurl_read_complete(rt->stream, clientdata,
RTMP_HANDSHAKE_PACKET_SIZE)) < 0) {
av_log(s, AV_LOG_ERROR, "Cannot read RTMP handshake response\n");
return AVERROR(EIO);
return ret;
}
av_log(s, AV_LOG_DEBUG, "Server version %d.%d.%d.%d\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment