* Fix a couple minor DLNA correctness issues.
This commit is contained in:
parent
7068d2fda4
commit
e0e0fa254d
@ -1034,7 +1034,8 @@ GetVideoMetadata(const char * path, char * name)
|
|||||||
ts = ctx->priv_data;
|
ts = ctx->priv_data;
|
||||||
if( ts->packet_size == 192 )
|
if( ts->packet_size == 192 )
|
||||||
{
|
{
|
||||||
if( dlna_timestamp_is_present(path) )
|
if( vc->profile == FF_PROFILE_H264_HIGH ||
|
||||||
|
dlna_timestamp_is_present(path) )
|
||||||
ts_timestamp = VALID;
|
ts_timestamp = VALID;
|
||||||
else
|
else
|
||||||
ts_timestamp = EMPTY;
|
ts_timestamp = EMPTY;
|
||||||
|
@ -87,7 +87,6 @@
|
|||||||
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
|
||||||
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
@ -142,15 +141,15 @@
|
|||||||
"http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01," \
|
"http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01," \
|
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01," \
|
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO;DLNA.ORG_OP=01," \
|
"http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01," \
|
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01," \
|
"http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01," \
|
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO;DLNA.ORG_OP=01," \
|
"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \
|
"http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \
|
||||||
"http-get:*:image/jpeg:*," \
|
"http-get:*:image/jpeg:*," \
|
||||||
"http-get:*:video/avi:*," \
|
"http-get:*:video/avi:*," \
|
||||||
"http-get:*:video/divx:*," \
|
"http-get:*:video/divx:*," \
|
||||||
|
@ -1696,7 +1696,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
off_t total, offset, size;
|
off_t total, offset, size;
|
||||||
sqlite_int64 id;
|
sqlite_int64 id;
|
||||||
int sendfh;
|
int sendfh;
|
||||||
static struct { sqlite_int64 id; char path[PATH_MAX]; char mime[32]; char dlna[64]; } last_file = { 0 };
|
static struct { sqlite_int64 id; char path[PATH_MAX]; char mime[32]; char dlna[96]; } last_file = { 0 };
|
||||||
#if USE_FORK
|
#if USE_FORK
|
||||||
pid_t newpid = 0;
|
pid_t newpid = 0;
|
||||||
#endif
|
#endif
|
||||||
|
23
upnpsoap.c
23
upnpsoap.c
@ -769,13 +769,13 @@ callback(void *args, int argc, char **argv, char **azColName)
|
|||||||
passed_args->size += ret;
|
passed_args->size += ret;
|
||||||
}
|
}
|
||||||
if( artist ) {
|
if( artist ) {
|
||||||
if( (*mime == 'a') && (passed_args->filter & FILTER_UPNP_ARTIST) ) {
|
if( (*mime == 'v') && (passed_args->filter & FILTER_UPNP_ACTOR) ) {
|
||||||
ret = snprintf(str_buf, 512, "<upnp:artist>%s</upnp:artist>", artist);
|
ret = snprintf(str_buf, 512, "<upnp:actor>%s</upnp:actor>", artist);
|
||||||
memcpy(passed_args->resp+passed_args->size, &str_buf, ret+1);
|
memcpy(passed_args->resp+passed_args->size, &str_buf, ret+1);
|
||||||
passed_args->size += ret;
|
passed_args->size += ret;
|
||||||
}
|
}
|
||||||
else if( (*mime == 'v') && (passed_args->filter & FILTER_UPNP_ACTOR) ) {
|
if( passed_args->filter & FILTER_UPNP_ARTIST ) {
|
||||||
ret = snprintf(str_buf, 512, "<upnp:actor>%s</upnp:actor>", artist);
|
ret = snprintf(str_buf, 512, "<upnp:artist>%s</upnp:artist>", artist);
|
||||||
memcpy(passed_args->resp+passed_args->size, &str_buf, ret+1);
|
memcpy(passed_args->resp+passed_args->size, &str_buf, ret+1);
|
||||||
passed_args->size += ret;
|
passed_args->size += ret;
|
||||||
}
|
}
|
||||||
@ -1321,13 +1321,14 @@ SearchContentDirectory(struct upnphttp * h, const char * action)
|
|||||||
groupBy[0] = '\0';
|
groupBy[0] = '\0';
|
||||||
if( !SearchCriteria )
|
if( !SearchCriteria )
|
||||||
{
|
{
|
||||||
asprintf(&newSearchCriteria, "1 = 1");
|
newSearchCriteria = strdup("1 = 1");
|
||||||
SearchCriteria = newSearchCriteria;
|
SearchCriteria = newSearchCriteria;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchCriteria = modifyString(SearchCriteria, """, "\"", 0);
|
SearchCriteria = modifyString(SearchCriteria, """, "\"", 0);
|
||||||
SearchCriteria = modifyString(SearchCriteria, "'", "'", 0);
|
SearchCriteria = modifyString(SearchCriteria, "'", "'", 0);
|
||||||
|
SearchCriteria = modifyString(SearchCriteria, "\\\"", "\"\"", 0);
|
||||||
SearchCriteria = modifyString(SearchCriteria, "object.", "", 0);
|
SearchCriteria = modifyString(SearchCriteria, "object.", "", 0);
|
||||||
SearchCriteria = modifyString(SearchCriteria, "derivedfrom", "like", 1);
|
SearchCriteria = modifyString(SearchCriteria, "derivedfrom", "like", 1);
|
||||||
SearchCriteria = modifyString(SearchCriteria, "contains", "like", 2);
|
SearchCriteria = modifyString(SearchCriteria, "contains", "like", 2);
|
||||||
@ -1343,16 +1344,14 @@ SearchContentDirectory(struct upnphttp * h, const char * action)
|
|||||||
SearchCriteria = modifyString(SearchCriteria, "@refID", "REF_ID", 0);
|
SearchCriteria = modifyString(SearchCriteria, "@refID", "REF_ID", 0);
|
||||||
if( strstr(SearchCriteria, "@id") )
|
if( strstr(SearchCriteria, "@id") )
|
||||||
{
|
{
|
||||||
newSearchCriteria = modifyString(strdup(SearchCriteria), "@id", "OBJECT_ID", 0);
|
newSearchCriteria = strdup(SearchCriteria);
|
||||||
SearchCriteria = newSearchCriteria;
|
newSearchCriteria = SearchCriteria = modifyString(newSearchCriteria, "@id", "OBJECT_ID", 0);
|
||||||
}
|
}
|
||||||
if( strstr(SearchCriteria, "res is ") )
|
if( strstr(SearchCriteria, "res is ") )
|
||||||
{
|
{
|
||||||
if( newSearchCriteria )
|
if( !newSearchCriteria )
|
||||||
newSearchCriteria = modifyString(newSearchCriteria, "res is ", "MIME is ", 0);
|
newSearchCriteria = strdup(SearchCriteria);
|
||||||
else
|
newSearchCriteria = SearchCriteria = modifyString(newSearchCriteria, "res is ", "MIME is ", 0);
|
||||||
newSearchCriteria = modifyString(strdup(SearchCriteria), "res is ", "MIME is ", 0);
|
|
||||||
SearchCriteria = newSearchCriteria;
|
|
||||||
}
|
}
|
||||||
#if 0 // Does 360 need this?
|
#if 0 // Does 360 need this?
|
||||||
if( strstr(SearchCriteria, "&") )
|
if( strstr(SearchCriteria, "&") )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user