aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-03-09 16:04:41 +0000
committerMartin Storsjö <martin@martin.st>2010-03-09 16:04:41 +0000
commitdb76ca7f3543ab9caadce1bda6d70d5c1d9be011 (patch)
tree556cf84ef96c06a7094a946394d78ad1117bd5b0 /libavformat
parent28e5130b5fac6991a21844639c83848675085356 (diff)
downloadffmpeg-db76ca7f3543ab9caadce1bda6d70d5c1d9be011.tar.gz
Use rt->control_uri consequently instead of s->filename in all RTSP commands
Originally committed as revision 22403 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c10
-rw-r--r--libavformat/rtspenc.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 0a7adfbbe0..8ade1c64ec 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1300,7 +1300,7 @@ static int rtsp_setup_input_streams(AVFormatContext *s)
snprintf(cmd, sizeof(cmd),
"DESCRIBE %s RTSP/1.0\r\n"
"Accept: application/sdp\r\n",
- s->filename);
+ rt->control_uri);
if (rt->server_type == RTSP_SERVER_REAL) {
/**
* The Require: attribute is needed for proper streaming from
@@ -1339,7 +1339,7 @@ static int rtsp_setup_output_streams(AVFormatContext *s)
snprintf(cmd, sizeof(cmd),
"ANNOUNCE %s RTSP/1.0\r\n"
"Content-Type: application/sdp\r\n",
- s->filename);
+ rt->control_uri);
sdp = av_mallocz(8192);
if (sdp == NULL)
return AVERROR(ENOMEM);
@@ -1366,7 +1366,7 @@ static int rtsp_setup_output_streams(AVFormatContext *s)
st->priv_data = rtsp_st;
rtsp_st->stream_index = i;
- av_strlcpy(rtsp_st->control_url, s->filename, sizeof(rtsp_st->control_url));
+ av_strlcpy(rtsp_st->control_url, rt->control_uri, sizeof(rtsp_st->control_url));
/* Note, this must match the relative uri set in the sdp content */
av_strlcatf(rtsp_st->control_url, sizeof(rtsp_st->control_url),
"/streamid=%d", i);
@@ -1469,7 +1469,7 @@ redirect:
sizeof(rt->control_uri));
for (rt->server_type = RTSP_SERVER_RTP;;) {
snprintf(cmd, sizeof(cmd),
- "OPTIONS %s RTSP/1.0\r\n", s->filename);
+ "OPTIONS %s RTSP/1.0\r\n", rt->control_uri);
if (rt->server_type == RTSP_SERVER_REAL)
av_strlcat(cmd,
/**
@@ -1890,7 +1890,7 @@ static int rtsp_read_close(AVFormatContext *s)
#endif
snprintf(cmd, sizeof(cmd),
"TEARDOWN %s RTSP/1.0\r\n",
- s->filename);
+ rt->control_uri);
ff_rtsp_send_cmd_async(s, cmd);
ff_rtsp_close_streams(s);
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c
index 5f893916f1..22db85809f 100644
--- a/libavformat/rtspenc.c
+++ b/libavformat/rtspenc.c
@@ -37,7 +37,7 @@ static int rtsp_write_record(AVFormatContext *s)
snprintf(cmd, sizeof(cmd),
"RECORD %s RTSP/1.0\r\n"
"Range: npt=%0.3f-\r\n",
- s->filename,
+ rt->control_uri,
(double) 0);
ff_rtsp_send_cmd(s, cmd, reply, NULL);
if (reply->status_code != RTSP_STATUS_OK)
@@ -111,7 +111,7 @@ static int rtsp_write_close(AVFormatContext *s)
snprintf(cmd, sizeof(cmd),
"TEARDOWN %s RTSP/1.0\r\n",
- s->filename);
+ rt->control_uri);
ff_rtsp_send_cmd_async(s, cmd);
ff_rtsp_close_streams(s);