* 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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user