Mercurial > libavcodec.hg
changeset 6641:25a963680a88 libavcodec
check alac EOF marker
Patch by Matthieu Castet castet matthieu free fr
author | benoit |
---|---|
date | Fri, 18 Apr 2008 08:58:18 +0000 |
parents | 28d3ca9d5c3c |
children | 866b9ade048c |
files | alac.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/alac.c Fri Apr 18 08:43:11 2008 +0000 +++ b/alac.c Fri Apr 18 08:58:18 2008 +0000 @@ -548,6 +548,8 @@ interlacing_shift = 0; interlacing_leftweight = 0; } + if (get_bits(&alac->gb, 3) != 7) + av_log(avctx, AV_LOG_ERROR, "Error : Wrong End Of Frame\n"); switch(alac->setinfo_sample_size) { case 16: @@ -577,6 +579,9 @@ break; } + if (input_buffer_size * 8 - get_bits_count(&alac->gb) > 8) + av_log(avctx, AV_LOG_ERROR, "Error : %d bits left\n", input_buffer_size * 8 - get_bits_count(&alac->gb)); + return input_buffer_size; }