diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-27 19:13:14 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-05-28 17:47:24 +0200 |
commit | 89806691b1c39181c63d95e0fddc30f11e2a7b04 (patch) | |
tree | 66fbee4bb00e6297ac427e43c9f202fd9ece7087 /libavcodec/wavpack.c | |
parent | eae1b8451a4d606dd457736ce7240ee12535fb36 (diff) | |
download | ffmpeg-89806691b1c39181c63d95e0fddc30f11e2a7b04.tar.gz |
wavpack: check that all the channels were coded.
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 7a14519bf9..0847238595 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -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; |