aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg4audio.h
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2011-10-21 17:25:30 +0200
committerJanne Grunau <janne-libav@jannau.net>2011-12-03 00:42:48 +0100
commitfd095539d10bb440042e671f95306b16b0fec674 (patch)
treec28e329a98879823371f7b3e3f388f83f3805fab /libavcodec/mpeg4audio.h
parent0eea212943544d40f99b05571aa7159d78667154 (diff)
downloadffmpeg-fd095539d10bb440042e671f95306b16b0fec674.tar.gz
latmdec: fix audio specific config parsing
Pass the correct size in bits to mpeg4audio_get_config and add a flag to disable parsing of the sync extension when the size is not known. Latm with AudioMuxVersion 0 does not specify the size of the audio specific config. Data after the audio specific config can be misinterpreted as sync extension resulting in random and wrong configs.
Diffstat (limited to 'libavcodec/mpeg4audio.h')
-rw-r--r--libavcodec/mpeg4audio.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index d6730b97b3..7560f3f4e4 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -42,14 +42,17 @@ typedef struct {
extern const int avpriv_mpeg4audio_sample_rates[16];
extern const uint8_t ff_mpeg4audio_channels[8];
+
/**
* Parse MPEG-4 systems extradata to retrieve audio configuration.
* @param[in] c MPEG4AudioConfig structure to fill.
* @param[in] buf Extradata from container.
- * @param[in] buf_size Extradata size.
+ * @param[in] bit_size Extradata size in bits.
+ * @param[in] sync_extension look for a sync extension after config if true.
* @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata.
*/
-int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size);
+int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
+ int bit_size, int sync_extension);
enum AudioObjectType {
AOT_NULL,