Commit 1cf0f279 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7e4e010b'

* commit '7e4e010b':
  mpeg4audio: check the init_get_bits() return value

Conflicts:
	libavcodec/mpeg4audio.c

See: deefdf97Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents aefb99f2 7e4e010b
......@@ -82,10 +82,15 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
int bit_size, int sync_extension)
{
GetBitContext gb;
int specific_config_bitindex;
int specific_config_bitindex, ret;
if (bit_size <= 0 || init_get_bits(&gb, buf, bit_size) < 0)
if (bit_size <= 0)
return AVERROR_INVALIDDATA;
ret = init_get_bits(&gb, buf, bit_size);
if (ret < 0)
return ret;
c->object_type = get_object_type(&gb);
c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
c->chan_config = get_bits(&gb, 4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment