summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 19:35:39 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 19:35:39 +0000
commitee08a2d2d37ef356b25d21821658e16c1de82254 (patch)
treec143e2dbe7be4dc027a4ad01fae14e7d340b0b34 /stream
parentbe3c6ae324446e74407e326d47758f8e397e3b45 (diff)
downloadmpv-ee08a2d2d37ef356b25d21821658e16c1de82254.tar.bz2
mpv-ee08a2d2d37ef356b25d21821658e16c1de82254.tar.xz
Make sure stream->fd is set correct (esp. to -1 on error when fd is closed)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21581 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/http.c b/stream/http.c
index 899c850ee2..ccf75eeba8 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -744,7 +744,6 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
goto err_out;
}
- stream->fd=fd;
if( mp_msg_test(MSGT_NETWORK,MSGL_V) ) {
http_debug_hdr( http_hdr );
}
@@ -857,9 +856,11 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
err_out:
if (fd > 0) closesocket( fd );
+ fd = -1;
res = -1;
http_free( http_hdr );
out:
+ stream->fd = fd;
return res;
}