audio: refuse to allocate frames in invalid format

This commit is contained in:
wm4 2014-11-11 21:10:53 +01:00
parent c827ae5f36
commit 475226c783
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ void mp_audio_set_null_data(struct mp_audio *mpa)
static int get_plane_size(const struct mp_audio *mpa, int samples)
{
if (samples < 0 || !mpa->format)
if (samples < 0 || !mp_audio_config_valid(mpa))
return -1;
if (samples >= INT_MAX / mpa->sstride)
return -1;