aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2010-04-19 11:42:02 +0000
committerLuca Barbato <lu_zero@gentoo.org>2010-04-19 11:42:02 +0000
commitbacde6466c392090ecd9246425ad047742516516 (patch)
tree5193d46de232732369f05c331e04a014ce8f6c06
parent9094d867aa131c96da0b1e7247e38adcfdd2c99e (diff)
downloadffmpeg-bacde6466c392090ecd9246425ad047742516516.tar.gz
Make ffserver support rfc3550
Originally committed as revision 22907 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffserver.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ffserver.c b/ffserver.c
index 9fd7eba6b4..6e4b4e0b04 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3042,7 +3042,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
RTSPMessageHeader *h)
{
FFStream *stream;
- int stream_index, port;
+ int stream_index, rtp_port, rtcp_port;
char buf[1024];
char path1[1024];
const char *path;
@@ -3156,11 +3156,12 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
switch(rtp_c->rtp_protocol) {
case RTSP_LOWER_TRANSPORT_UDP:
- port = rtp_get_local_port(rtp_c->rtp_handles[stream_index]);
+ rtp_port = rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]);
+ rtcp_port = rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]);
url_fprintf(c->pb, "Transport: RTP/AVP/UDP;unicast;"
"client_port=%d-%d;server_port=%d-%d",
- th->client_port_min, th->client_port_min + 1,
- port, port + 1);
+ th->client_port_min, th->client_port_max,
+ rtp_port, rtcp_port);
break;
case RTSP_LOWER_TRANSPORT_TCP:
url_fprintf(c->pb, "Transport: RTP/AVP/TCP;interleaved=%d-%d",