Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-11-30 17:12:40 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-12-02 20:16:30 +0300
commit33a2b73b98374de4781ae0497cf74b2ce07a9615 (patch)
tree47f839cb29a43e17267428d8df9cf702b5469e1f /libavcodec/mpeg4audio.c
parentd82d5379caca21005d8906829b35361c4a65408e (diff)
mpeg4audio: correctly propagate meaningful error values
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mpeg4audio.c')
-rw-r--r--libavcodec/mpeg4audio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index 2363cb637d..af8e6552ff 100644
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -33,10 +33,10 @@
static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c)
{
if (get_bits_left(gb) < 112)
- return -1;
+ return AVERROR_INVALIDDATA;
if (get_bits_long(gb, 32) != MKBETAG('A','L','S','\0'))
- return -1;
+ return AVERROR_INVALIDDATA;
// override AudioSpecificConfig channel configuration and sample rate
// which are buggy in old ALS conformance files
@@ -116,8 +116,9 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
specific_config_bitindex = get_bits_count(&gb);
- if (parse_config_ALS(&gb, c))
- return -1;
+ ret = parse_config_ALS(&gb, c);
+ if (ret < 0)
+ return ret;
}
if (c->ext_object_type != AOT_SBR && sync_extension) {