[FFmpeg-cvslog] RTMP: fix FD leak in rtmp_open()

Alexander Drozdov git at videolan.org
Tue Sep 30 11:31:06 CEST 2014


ffmpeg | branch: master | Alexander Drozdov <adrozdoff at gmail.com> | Fri Sep 26 09:45:08 2014 +1100| [08ccc474b73a3acef5e56060c8174d4e82ace20d] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08ccc474b73a3acef5e56060c8174d4e82ace20d
---

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

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 3cde966..6122548 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



More information about the ffmpeg-cvslog mailing list