* Handle errors in WMV DLNA profiling.
This commit is contained in:
parent
f221610816
commit
1c0bf5197d
56
metadata.c
56
metadata.c
@ -744,33 +744,55 @@ GetVideoMetadata(const char * path, char * name)
|
|||||||
(ctx->streams[video_stream]->codec->height <= 288) &&
|
(ctx->streams[video_stream]->codec->height <= 288) &&
|
||||||
(ctx->bit_rate/8 <= 384000) )
|
(ctx->bit_rate/8 <= 384000) )
|
||||||
{
|
{
|
||||||
if( audio_profile == MP3 )
|
switch( audio_profile )
|
||||||
strcpy(profile, "MP3");
|
{
|
||||||
else if( audio_profile == WMA_BASE )
|
case MP3:
|
||||||
strcpy(profile, "BASE");
|
asprintf(&m.dlna_pn, "WMVSPML_MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
asprintf(&m.dlna_pn, "WMVSPML_%s;DLNA.ORG_OP=01;DLNA.ORG_CI=0", profile);
|
break;
|
||||||
|
case WMA_BASE:
|
||||||
|
asprintf(&m.dlna_pn, "WMVSPML_BASE;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for WMVSPML/0x%X file %s\n", audio_profile, path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( (ctx->streams[video_stream]->codec->width <= 720) &&
|
else if( (ctx->streams[video_stream]->codec->width <= 720) &&
|
||||||
(ctx->streams[video_stream]->codec->height <= 576) &&
|
(ctx->streams[video_stream]->codec->height <= 576) &&
|
||||||
(ctx->bit_rate/8 <= 10000000) )
|
(ctx->bit_rate/8 <= 10000000) )
|
||||||
{
|
{
|
||||||
if( audio_profile == WMA_PRO )
|
switch( audio_profile )
|
||||||
strcpy(profile, "PRO");
|
{
|
||||||
else if( audio_profile == WMA_FULL )
|
case WMA_PRO:
|
||||||
strcpy(profile, "FULL");
|
asprintf(&m.dlna_pn, "WMVMED_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
else if( audio_profile == WMA_BASE )
|
break;
|
||||||
strcpy(profile, "BASE");
|
case WMA_FULL:
|
||||||
asprintf(&m.dlna_pn, "WMVMED_%s;DLNA.ORG_OP=01;DLNA.ORG_CI=0", profile);
|
asprintf(&m.dlna_pn, "WMVMED_FULL;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
|
break;
|
||||||
|
case WMA_BASE:
|
||||||
|
asprintf(&m.dlna_pn, "WMVMED_BASE;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for WMVMED/0x%X file %s\n", audio_profile, path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( (ctx->streams[video_stream]->codec->width <= 1920) &&
|
else if( (ctx->streams[video_stream]->codec->width <= 1920) &&
|
||||||
(ctx->streams[video_stream]->codec->height <= 1080) &&
|
(ctx->streams[video_stream]->codec->height <= 1080) &&
|
||||||
(ctx->bit_rate/8 <= 20000000) )
|
(ctx->bit_rate/8 <= 20000000) )
|
||||||
{
|
{
|
||||||
if( audio_profile == WMA_FULL )
|
switch( audio_profile )
|
||||||
strcpy(profile, "FULL");
|
{
|
||||||
else if( audio_profile == WMA_PRO )
|
case WMA_PRO:
|
||||||
strcpy(profile, "PRO");
|
asprintf(&m.dlna_pn, "WMVHIGH_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
asprintf(&m.dlna_pn, "WMVHIGH_%s;DLNA.ORG_OP=01;DLNA.ORG_CI=0", profile);
|
break;
|
||||||
|
case WMA_FULL:
|
||||||
|
asprintf(&m.dlna_pn, "WMVHIGH_FULL;DLNA.ORG_OP=01;DLNA.ORG_CI=0");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for WMVHIGH/0x%X file %s\n", audio_profile, path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODEC_ID_XVID:
|
case CODEC_ID_XVID:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user