[libav-commits] rtmpproto: Make sure to pass on the error code if read_connect failed

Martin Storsjö git at libav.org
Sun Apr 20 22:35:13 CEST 2014


Module: libav
Branch: release/9
Commit: b77819afbc44016143b4a11b46109625203c4cef

Author:    Martin Storsjö <martin at martin.st>
Committer: Sean McGovern <gseanmcg at gmail.com>
Date:      Sun Apr 13 13:44:03 2014 +0300

rtmpproto: Make sure to pass on the error code if read_connect failed

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 at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 6477139721f559b26eafd415e23e13ea2b0c27e1)

---

 libavformat/rtmpproto.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 9989b28..b18d4b3 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2443,7 +2443,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;
         rt->is_input = 1;
     }



More information about the libav-commits mailing list