[FFmpeg-cvslog] wavpack: check that all the channels were coded.
Anton Khirnov
git at videolan.org
Wed May 29 05:18:36 CEST 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon May 27 19:13:14 2013 +0200| [89806691b1c39181c63d95e0fddc30f11e2a7b04] | committer: Anton Khirnov
wavpack: check that all the channels were coded.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89806691b1c39181c63d95e0fddc30f11e2a7b04
---
libavcodec/wavpack.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 7a14519..0847238 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;
More information about the ffmpeg-cvslog
mailing list