* Make strict DLNA adherence optional. Many products appear to handle JPEGs >4096x4096 classified as JPEG_LRG, and it's better to not downscale if we don't have to.

This commit is contained in:
Justin Maggard
2009-10-14 21:24:23 +00:00
parent b632bf1704
commit 4efa9d06ac
8 changed files with 25 additions and 13 deletions

View File

@ -373,11 +373,15 @@ init(int argc, char * * argv)
break;
case UPNPINOTIFY:
if( (strcmp(ary_options[i].value, "yes") != 0) && !atoi(ary_options[i].value) )
CLEARFLAG(INOTIFYMASK);
CLEARFLAG(INOTIFY_MASK);
break;
case ENABLE_TIVO:
if( (strcmp(ary_options[i].value, "yes") == 0) || atoi(ary_options[i].value) )
SETFLAG(TIVOMASK);
SETFLAG(TIVO_MASK);
break;
case ENABLE_DLNA_STRICT:
if( (strcmp(ary_options[i].value, "yes") == 0) || atoi(ary_options[i].value) )
SETFLAG(DLNA_STRICT_MASK);
break;
default:
fprintf(stderr, "Unknown option in file %s\n",
@ -741,7 +745,7 @@ main(int argc, char * * argv)
sqlite3_free_table(result);
}
if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005001 &&
GETFLAG(INOTIFYMASK) && pthread_create(&inotify_thread, NULL, start_inotify, NULL) )
GETFLAG(INOTIFY_MASK) && pthread_create(&inotify_thread, NULL, start_inotify, NULL) )
{
DPRINTF(E_FATAL, L_GENERAL, "ERROR: pthread_create() failed for start_inotify.\n");
}
@ -768,7 +772,7 @@ main(int argc, char * * argv)
}
#ifdef TIVO_SUPPORT
if( GETFLAG(TIVOMASK) )
if( GETFLAG(TIVO_MASK) )
{
DPRINTF(E_WARN, L_GENERAL, "TiVo support is enabled.\n");
/* Add TiVo-specific randomize function to sqlite */
@ -834,7 +838,7 @@ main(int argc, char * * argv)
}
}
#ifdef TIVO_SUPPORT
if( GETFLAG(TIVOMASK) )
if( GETFLAG(TIVO_MASK) )
{
if(timeofday.tv_sec >= (lastbeacontime.tv_sec + beacon_interval))
{