summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-06-24 01:55:00 +0300
committerMartin Storsjö <martin@martin.st>2011-10-17 19:57:49 +0300
commit9867aea5242b72ef182c1ffdbb08940a101f359b (patch)
tree13327478c1607d519fd26bf153bc8d8a05ccaba5 /libavformat
parenteca4850c6d2e8074e76234060991f490f1cff950 (diff)
rtsp: Remove the separate filter_source variable
Read it as a flag from the flags field instead. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c6
-rw-r--r--libavformat/rtsp.h4
2 files changed, 2 insertions, 8 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9dbdcc0add..afd8e771e1 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1235,7 +1235,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
case RTSP_LOWER_TRANSPORT_UDP: {
char url[1024], options[30] = "";
- if (rt->filter_source)
+ if (rt->rtsp_flags & RTSP_FLAG_FILTER_SRC)
av_strlcpy(options, "?connect=1", sizeof(options));
/* Use source address if specified */
if (reply->transports[0].source[0]) {
@@ -1333,8 +1333,6 @@ int ff_rtsp_connect(AVFormatContext *s)
}
/* Only pass through valid flags from here */
rt->lower_transport_mask &= (1 << RTSP_LOWER_TRANSPORT_NB) - 1;
- if (rt->rtsp_flags & RTSP_FLAG_FILTER_SRC)
- rt->filter_source = 1;
redirect:
lower_transport_mask = rt->lower_transport_mask;
@@ -1373,7 +1371,7 @@ redirect:
lower_transport_mask |= (1<< RTSP_LOWER_TRANSPORT_TCP);
rt->control_transport = RTSP_MODE_TUNNEL;
} else if (!strcmp(option, "filter_src")) {
- rt->filter_source = 1;
+ rt->rtsp_flags |= RTSP_FLAG_FILTER_SRC;
} else {
/* Write options back into the buffer, using memmove instead
* of strcpy since the strings may overlap. */
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index a03ad9d2fe..7143acbe4f 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -317,10 +317,6 @@ typedef struct RTSPState {
/** Reusable buffer for receiving packets */
uint8_t* recvbuf;
- /** Filter incoming UDP packets - receive packets only from the right
- * source address and port. */
- int filter_source;
-
/**
* A mask with all requested transport methods
*/