From: Alexander Drozdov <[email protected]>

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 <[email protected]>
Signed-off-by: Uwe L. Korn <[email protected]>
---
 libavformat/rtmpproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 55987b7..766acdf 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2832,7 +2832,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
-- 
2.1.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to