rtmpproto: Make sure to pass on the error code if read_connect failed
authorMartin Storsjö <martin@martin.st>
Sun, 13 Apr 2014 10:44:03 +0000 (13:44 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 14 Apr 2014 08:09:20 +0000 (11:09 +0300)
Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index 51381a4..bc6a4fe 100644 (file)
@@ -2555,7 +2555,7 @@ reconnect:
         if ((ret = gen_connect(s, rt)) < 0)
             goto fail;
     } else {
-        if (read_connect(s, s->priv_data) < 0)
+        if ((ret = read_connect(s, s->priv_data)) < 0)
             goto fail;
     }