summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorAlexander Drozdov <adrozdoff@gmail.com>2014-09-26 09:45:08 +1100
committerMichael Niedermayer <michaelni@gmx.at>2014-09-30 11:26:25 +0200
commit08ccc474b73a3acef5e56060c8174d4e82ace20d (patch)
tree267b62e61be0b3785155d09d1e785b483e3a9c54 /libavformat/rtmpproto.c
parent61c0683080176cfc6c325e556a3b7a4ca9566d5c (diff)
RTMP: fix FD leak in rtmp_open()
If we setup AVIO interrupt callback and it will be returns 1 on socket timeouts and we try to connect to non-existing streams on some servers (like nginx-rtmp) we got FD leak. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 3cde966b1f..6122548dc8 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2670,7 +2670,7 @@ reconnect:
// audio or video packet arrives.
while (!rt->has_audio && !rt->has_video && !rt->received_metadata) {
if ((ret = get_packet(s, 0)) < 0)
- return ret;
+ goto fail;
}
// Either after we have read the metadata or (if there is none) the