Mercurial > mplayer.hg
diff stream/network.c @ 31511:13ca93203358
Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.
author | diego |
---|---|
date | Mon, 28 Jun 2010 08:26:14 +0000 |
parents | b01f807eb183 |
children | 4c973cb80fa5 |
line wrap: on
line diff
--- a/stream/network.c Sun Jun 27 20:47:26 2010 +0000 +++ b/stream/network.c Mon Jun 28 08:26:14 2010 +0000 @@ -43,15 +43,13 @@ #include "stream.h" #include "libmpdemux/demuxer.h" #include "m_config.h" - +#include "mpcommon.h" #include "network.h" #include "tcp.h" #include "http.h" #include "cookies.h" #include "url.h" -#include "version.h" - extern int stream_cache_size; /* Variables for the command line option -user, -passwd, -bandwidth, @@ -220,12 +218,10 @@ snprintf(str, 256, "Host: %s", server_url->hostname ); http_set_field( http_hdr, str); if (network_useragent) - { snprintf(str, 256, "User-Agent: %s", network_useragent); - http_set_field(http_hdr, str); - } else - http_set_field( http_hdr, "User-Agent: MPlayer/"VERSION); + snprintf(str, 256, "User-Agent: %s", mplayer_version); + http_set_field(http_hdr, str); if (network_referrer) { char *referrer = NULL;