[FFmpeg-cvslog] dca: dont overread dca_default_coeffs.
Michael Niedermayer
git at videolan.org
Wed Feb 29 21:51:27 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 29 21:14:17 2012 +0100| [d7bce4a274c4fc7453cde2d1c5d8a7a5805718df] | committer: Michael Niedermayer
dca: dont overread dca_default_coeffs.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7bce4a274c4fc7453cde2d1c5d8a7a5805718df
---
libavcodec/dca.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 33e4120..3158263 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -801,10 +801,14 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
}
} else {
int am = s->amode & DCA_CHANNEL_MASK;
+ if (am < 16) {
for (j = base_channel; j < s->prim_channels; j++) {
s->downmix_coef[j][0] = dca_default_coeffs[am][j][0];
s->downmix_coef[j][1] = dca_default_coeffs[am][j][1];
}
+ } else {
+ av_log(s->avctx, AV_LOG_WARNING, "amode > 15 default downmix_coef unsupported\n");
+ }
}
}
More information about the ffmpeg-cvslog
mailing list