diff options
author | Matthieu Castet <castet.matthieu@free.fr> | 2008-04-18 08:58:18 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-04-18 08:58:18 +0000 |
commit | e5ab7379503ad7c6b4a2e2de57d1f3b81905cbe2 (patch) | |
tree | a2ea0c0c96df5cf4c2fab5712790556840207b1a /libavcodec/alac.c | |
parent | 2003d3da1a31a3bf01fce19c935d29ef0c525884 (diff) | |
download | ffmpeg-streaming-e5ab7379503ad7c6b4a2e2de57d1f3b81905cbe2.zip ffmpeg-streaming-e5ab7379503ad7c6b4a2e2de57d1f3b81905cbe2.tar.gz |
check alac EOF marker
Patch by Matthieu Castet castet matthieu free fr
Originally committed as revision 12891 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r-- | libavcodec/alac.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index aa055c6..f85493f 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -548,6 +548,8 @@ static int alac_decode_frame(AVCodecContext *avctx, 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 @@ static int alac_decode_frame(AVCodecContext *avctx, 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; } |