1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

wavpack: check that all the channels were coded.

This commit is contained in:
Anton Khirnov 2013-05-27 19:13:14 +02:00
parent eae1b8451a
commit 89806691b1

View File

@ -1212,6 +1212,11 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
buf_size -= frame_size;
}
if (s->ch_offset != avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "Not enough channels coded in a packet.\n");
return AVERROR_INVALIDDATA;
}
*got_frame_ptr = 1;
return avpkt->size;