* Fix a bad free with some video files with AAC audio.
This commit is contained in:
parent
2170f6a53b
commit
107b808021
20
metadata.c
20
metadata.c
@ -1075,24 +1075,32 @@ GetVideoMetadata(const char * path, char * name)
|
||||
m.dlna_pn = NULL;
|
||||
break;
|
||||
}
|
||||
switch( audio_profile )
|
||||
if( audio_profile == PROFILE_AUDIO_AMR )
|
||||
{
|
||||
case PROFILE_AUDIO_AMR:
|
||||
off += sprintf(m.dlna_pn+off, "AMR");
|
||||
break;
|
||||
case PROFILE_AUDIO_AAC:
|
||||
}
|
||||
else if( audio_profile == PROFILE_AUDIO_AAC )
|
||||
{
|
||||
off += sprintf(m.dlna_pn+off, "AAC_");
|
||||
if( ctx->bit_rate < 540000 )
|
||||
{
|
||||
off += sprintf(m.dlna_pn+off, "540");
|
||||
break;
|
||||
}
|
||||
else if( ctx->bit_rate < 940000 )
|
||||
{
|
||||
off += sprintf(m.dlna_pn+off, "940");
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for %s file %s\n",
|
||||
m.dlna_pn, basename(path));
|
||||
free(m.dlna_pn);
|
||||
m.dlna_pn = NULL;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for %s file %s\n",
|
||||
m.dlna_pn, basename(path));
|
||||
free(m.dlna_pn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user