diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 76b5df84004603a74a1440e3e24c9dd4488a9632..551884ba70e1b37d104e4ed3b1e8c2920c3fc093 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 != ',') diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index e512336ab09515d4f61e2bcf3f9afc8719392136..55743b5d2d2d8fbc84ac1920666a2c96232f1e34 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -102,6 +102,9 @@ typedef struct RTSPTransportField { * packets will be allowed to make before being discarded. */ int ttl; + /** transport set to record data */ + int mode_record; + struct sockaddr_storage destination; /**< destination IP address */ char source[INET6_ADDRSTRLEN + 1]; /**< source IP address */