You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
committed by
Ronald S. Bultje
parent
22f893e1c9
commit
7a4fb3fd93
@@ -514,8 +514,11 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
|
|||||||
/* point to the start of the encoded data */
|
/* point to the start of the encoded data */
|
||||||
const unsigned char *p = buf + 16;
|
const unsigned char *p = buf + 16;
|
||||||
|
|
||||||
if (buf_size < 16)
|
if (buf_size < 16) {
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "skipping small junk packet\n");
|
||||||
|
*data_size = 0;
|
||||||
return buf_size;
|
return buf_size;
|
||||||
|
}
|
||||||
|
|
||||||
block_type = buf[6];
|
block_type = buf[6];
|
||||||
if (block_type < BLOCK_TYPE_AUDIO || block_type > BLOCK_TYPE_SILENCE) {
|
if (block_type < BLOCK_TYPE_AUDIO || block_type > BLOCK_TYPE_SILENCE) {
|
||||||
|
Reference in New Issue
Block a user