]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/utils: report insane channel count errors
authorMarton Balint <cus@passwd.hu>
Tue, 3 Jul 2018 10:09:13 +0000 (12:09 +0200)
committerMarton Balint <cus@passwd.hu>
Fri, 13 Jul 2018 20:24:33 +0000 (22:24 +0200)
More than 64 is not *that* insane, so let's report the error at least.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavcodec/utils.c

index 02e557eb05a444cc4bfe01ea7383932a088b0fc3..4f9a2b76efad84428d8cf836fe925d16115343fd 100644 (file)
@@ -674,6 +674,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
         av_freep(&avctx->subtitle_header);
 
     if (avctx->channels > FF_SANE_NB_CHANNELS) {
+        av_log(avctx, AV_LOG_ERROR, "Too many channels: %d\n", avctx->channels);
         ret = AVERROR(EINVAL);
         goto free_and_end;
     }