]> git.sesse.net Git - ffmpeg/commitdiff
Only send out NAT-punching RTP/RTCP packets when we're in demuxer mode, i.e.
authorMartin Storsjö <martin@martin.st>
Fri, 19 Feb 2010 23:13:21 +0000 (23:13 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 19 Feb 2010 23:13:21 +0000 (23:13 +0000)
don't send them when acting as a RTSP muxer.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21913 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtsp.c

index d16a9bddb9c703d3413f38bfc692e38ad78af11a..0bba88a8ea5787d665bb9bffc6e0c52dd5cefa2d 100644 (file)
@@ -1177,7 +1177,7 @@ static int make_setup_request(AVFormatContext *s, const char *host, int port,
              * potential NAT router by sending dummy packets.
              * RTP/RTCP dummy packets are used for RDT, too.
              */
-            if (!(rt->server_type == RTSP_SERVER_WMS && i > 1))
+            if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat)
                 rtp_send_punch_packets(rtsp_st->rtp_handle);
             break;
         }