summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-31 03:14:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-31 03:14:22 +0000
commit84af4a7ee6f938c6466c8d795ead0e6ee8ed486d (patch)
treec86e8db25ee6c0987275e35ca8faf65b662d250e
parent9da235c80399a2a10aebcd38d81a371f4575767e (diff)
10l (missing overflow check)
Originally committed as revision 3908 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegaudiodec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 04f34d9025..782de57e6f 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -231,6 +231,9 @@ static inline int l3_unscale(int value, int exponent)
#if FRAC_BITS <= 15
if (e > 31)
e = 31;
+#else
+ if (e > 63)
+ e = 63;
#endif
m = table_4_3_value[value];
#if FRAC_BITS <= 15
@@ -2137,11 +2140,11 @@ void sample_dump(int fnum, int32_t *tab, int n)
if (fnum == 0) {
static int pos = 0;
- printf("pos=%d\n", pos);
+ av_log(NULL, AV_LOG_DEBUG, "pos=%d\n", pos);
for(i=0;i<n;i++) {
- printf(" %0.4f", (double)tab[i] / FRAC_ONE);
+ av_log(NULL, AV_LOG_DEBUG, " %0.4f", (double)tab[i] / FRAC_ONE);
if ((i % 18) == 17)
- printf("\n");
+ av_log(NULL, AV_LOG_DEBUG, "\n");
}
pos += n;
}