summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis.h
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-06-04 18:27:03 -0700
committerAlex Converse <alex.converse@gmail.com>2012-06-05 09:51:51 -0700
commitecf79c4d3e8baaf2f303278ef81db6f8407656bc (patch)
tree5a0f45fbc87f874fc2194128f37361fc23074657 /libavcodec/vorbis.h
parent503f2feb143b58bf9b7850ef00ec0bb02d509f78 (diff)
downloadffmpeg-ecf79c4d3e8baaf2f303278ef81db6f8407656bc.tar.gz
vorbis: Validate that the floor 1 X values contain no duplicates.
Duplicate values in this vector are explicitly banned by the Vorbis I spec and cause divide-by-zero crashes later on.
Diffstat (limited to 'libavcodec/vorbis.h')
-rw-r--r--libavcodec/vorbis.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index 924ca800b2..ee4967cdfe 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -36,7 +36,8 @@ typedef struct {
uint16_t high;
} vorbis_floor1_entry;
-void ff_vorbis_ready_floor1_list(vorbis_floor1_entry * list, int values);
+int ff_vorbis_ready_floor1_list(AVCodecContext *avccontext,
+ vorbis_floor1_entry *list, int values);
unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n); // x^(1/n)
int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num);
void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,