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
1 changed files with 5 additions and 0 deletions

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;