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