Hi!

In our project we uses FFmpeg to demux RTMP streams. Input stream takes
from Wowza/nginx-rtmp. Our application is a daemon that try to connect to
source periodicaly if it does not present (does not published to Wowza, for
example). We also use interrupt callback to break connection if timeout is
occured. So in this situation:
- Alive server
- Alive streaming application
- Configured inerrupt callback with timeout
- Disalive stream

TCP socket to server does not closes.

I look into code with debugger and found place where error is occured:
rtmpproto.c, rtmp_open() L:2672

Root couse: return from function without resources clean up

Solution: replace return with 'goto fail'

Path is attached.

-- 
WBR, Alexander Drozdov
http://htrd.su
--- old/libavformat/rtmpproto.c 2014-09-09 17:53:51.689708377 +1100
+++ orig/libavformat/rtmpproto.c        2014-09-09 17:54:05.833530565 +1100
@@ -2670,7 +2670,7 @@
         // 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
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to