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:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-07 05:02:13 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-01-07 05:30:27 +0400
commit6a56f4e63423d616b2224f654c1794fac25d6cfb (patch)
treeec0756ebd0ecbdee1932c95824101214367c96ee /libavcodec/vorbis.c
parent12d8340f16eed211f153e859b749ad415c1ba384 (diff)
parentb348c852aa8312d361123df0fa20e16feff7c2f1 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: flicvideo: fix invalid reads vorbis: Avoid some out-of-bounds reads vqf: add more known extensions cabac: remove unused function renorm_cabac_decoder h264: Only use symbols from the SVQ3 decoder under proper conditionals. add bytestream2_tell() and bytestream2_seek() functions parsers: initialize MpegEncContext.slice_context_count to 1 spdifenc: use special alignment for DTS-HD length_code Conflicts: libavcodec/flicvideo.c libavcodec/h264.c libavcodec/mpeg4video_parser.c libavcodec/vorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbis.c')
-rw-r--r--libavcodec/vorbis.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index b20e398b93..28176f3b12 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -156,7 +156,7 @@ void ff_vorbis_ready_floor1_list(vorbis_floor1_entry * list, int values)
}
}
-static inline void render_line_unrolled(intptr_t x, unsigned char y, int x1,
+static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1,
intptr_t sy, int ady, int adx,
float *buf)
{
@@ -179,7 +179,7 @@ static inline void render_line_unrolled(intptr_t x, unsigned char y, int x1,
}
}
-static void render_line(int x0, unsigned char y0, int x1, int y1, float *buf)
+static void render_line(int x0, uint8_t y0, int x1, int y1, float *buf)
{
int dy = y1 - y0;
int adx = x1 - x0;
@@ -189,10 +189,10 @@ static void render_line(int x0, unsigned char y0, int x1, int y1, float *buf)
if (ady*2 <= adx) { // optimized common case
render_line_unrolled(x0, y0, x1, sy, ady, adx, buf);
} else {
- int base = dy / adx;
- int x = x0;
- unsigned char y = y0;
- int err = -adx;
+ int base = dy / adx;
+ int x = x0;
+ uint8_t y = y0;
+ int err = -adx;
ady -= FFABS(base) * adx;
while (++x < x1) {
y += base;
@@ -210,7 +210,8 @@ void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
uint16_t *y_list, int *flag,
int multiplier, float *out, int samples)
{
- int lx, ly, i;
+ int lx, i;
+ uint8_t ly;
lx = 0;
ly = y_list[0] * multiplier;
for (i = 1; i < values; i++) {