* Add some conditional statements to work with more ffmpeg library versions.

* Fix a crash bug when generating a friendly name if the hostname does not contain a dot.
* Implement folder browsing by media type.
* Add initial DLNA-compliant music album art support. (Using a <=160x160 cover.jpg, or folder.jpg, etc)
This commit is contained in:
Justin Maggard
2009-01-30 08:50:09 +00:00
parent 4925fa0587
commit 8cab1a2800
13 changed files with 433 additions and 303 deletions

View File

@ -211,12 +211,15 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str)
void
getfriendlyname(char * buf, int len)
{
char * dot = NULL;
char * hn = calloc(1, 256);
if( gethostname(hn, 256) == 0 )
{
strncpy(buf, hn, len-1);
buf[len] = '\0';
*strstr(buf, ".") = '\0';
dot = index(buf, '.');
if( dot )
*dot = '\0';
}
else
{