summaryrefslogtreecommitdiffstats
path: root/stream/http.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-08 22:42:31 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-08 22:42:31 +0000
commitc407b9b070d57361f888228037b7b9ce712dc6e2 (patch)
tree103952aef58501e14a88affb4e4696bc0dc7a6f7 /stream/http.c
parentbb52578528a95fffaa250b756c6366452ab28477 (diff)
downloadmpv-c407b9b070d57361f888228037b7b9ce712dc6e2.tar.bz2
mpv-c407b9b070d57361f888228037b7b9ce712dc6e2.tar.xz
Support URL redirections that do not specify full URL.
Fixes crash with mplayer -playlist http://www.radioseven.se/radioseven.pls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20800 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/http.c')
-rw-r--r--stream/http.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stream/http.c b/stream/http.c
index 013c6491d9..8ae933a2bb 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -835,8 +835,7 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
next_url = http_get_field( http_hdr, "Location" );
if( next_url!=NULL ) {
closesocket( fd );
- url_free( url );
- stream->streaming_ctrl->url = url = url_new( next_url );
+ stream->streaming_ctrl->url = url_redirect( &url, next_url );
http_free( http_hdr );
redirect = 1;
}