Mercurial > mplayer.hg
comparison stream/stream_rtsp.c @ 35301:8f6d3f8ffa61
Add url_new_with_proxy function to reduce code duplication and memleaks.
author | reimar |
---|---|
date | Sat, 10 Nov 2012 13:19:29 +0000 |
parents | c3c9652058f8 |
children |
comparison
equal
deleted
inserted
replaced
35300:ebcf337f1786 | 35301:8f6d3f8ffa61 |
---|---|
139 } | 139 } |
140 | 140 |
141 static int | 141 static int |
142 rtsp_streaming_open (stream_t *stream, int mode, void *opts, int *file_format) | 142 rtsp_streaming_open (stream_t *stream, int mode, void *opts, int *file_format) |
143 { | 143 { |
144 URL_t *url; | |
145 | |
146 mp_msg (MSGT_OPEN, MSGL_V, "STREAM_RTSP, URL: %s\n", stream->url); | 144 mp_msg (MSGT_OPEN, MSGL_V, "STREAM_RTSP, URL: %s\n", stream->url); |
147 stream->streaming_ctrl = streaming_ctrl_new (); | 145 stream->streaming_ctrl = streaming_ctrl_new (); |
148 if (!stream->streaming_ctrl) | 146 if (!stream->streaming_ctrl) |
149 return STREAM_ERROR; | 147 return STREAM_ERROR; |
150 | 148 |
151 stream->streaming_ctrl->bandwidth = network_bandwidth; | 149 stream->streaming_ctrl->bandwidth = network_bandwidth; |
152 url = url_new (stream->url); | 150 stream->streaming_ctrl->url = url_new_with_proxy(stream->url); |
153 stream->streaming_ctrl->url = check4proxies (url); | |
154 | 151 |
155 stream->fd = -1; | 152 stream->fd = -1; |
156 index_mode = -1; /* prevent most RTSP streams from locking due to -idx */ | 153 index_mode = -1; /* prevent most RTSP streams from locking due to -idx */ |
157 if (rtsp_streaming_start (stream) < 0) | 154 if (rtsp_streaming_start (stream) < 0) |
158 { | 155 { |