[MPlayer-dev-eng] Re: [wigren at home.se: [PATCH] Selectable User-Agent for HTTP transfers]
Alban Bedel
albeu at free.fr
Thu Oct 16 08:47:11 CEST 2003
Hi Dave Lambley,
on 16 Oct 2003 00:12:14 +0100 you wrote:
Watchout string options. They should never point to some static string.
Initialization with a static string is ok, but when mplayer is running
the string will always be (and must always be) a malloced one.
So you should first free it and strdup the static string like this.
> + redirect = 1;
+ if(network_useragent) free(network_useragent);
+ network_useragent = strdup("iTunes/4.0 (Macintosh; N; PPC)");
> + tried_ua_hack = 1;
BTW i don't really like to have all my http connections to try this hack.
What about adding another option to enable/disable it ? Like a flag wich
act on tried_ua_hack ?
Albeu
--
Everything is controlled by a small evil group
to which, unfortunately, no one we know belongs.
More information about the MPlayer-dev-eng
mailing list