Browse Source

Merge commit 'bfe18be88a66da25b60a091de6011197dcb231fd' into release/2.4

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

Conflicts:
	libavcodec/mpeg4audio.c

See: deefdf9788
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.7
Michael Niedermayer 11 years ago
parent
commit
05b1ac2470
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      libavcodec/mpeg4audio.c

+ 7
- 2
libavcodec/mpeg4audio.c View File

@@ -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);


Loading…
Cancel
Save