diff options
author | Jordi Ortiz <nenjordi@gmail.com> | 2012-07-10 21:21:58 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-07-10 22:20:04 +0400 |
commit | 45b068580b8c7d65a4422b47f2b98b258cf9587b (patch) | |
tree | b8ea59cb93863c7715e8fc11070a575f47fd3db7 /libavformat/rtsp.c | |
parent | ed219ed36606be307403b46f969a82bf0568865b (diff) |
rtsp: Parse the mode=receive/record parameter in transport lines
We need to support the nonstandard mode=receive, for compatibility
with older libavformat clients.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 76b5df8400..551884ba70 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -749,6 +749,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) get_word_sep(buf, sizeof(buf), ";,", &p); av_strlcpy(th->source, buf, sizeof(th->source)); } + } else if (!strcmp(parameter, "mode")) { + if (*p == '=') { + p++; + get_word_sep(buf, sizeof(buf), ";, ", &p); + if (!strcmp(buf, "record") || + !strcmp(buf, "receive")) + th->mode_record = 1; + } } while (*p != ';' && *p != '\0' && *p != ',') |