[FFmpeg-cvslog] avcodec/dnxhdenc: check that qmax is within the supported range
Michael Niedermayer
git at videolan.org
Fri Jan 17 21:30:16 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 17 20:58:43 2014 +0100| [19df5dcb4734d699da7177d5cfc8dc1bdcbf91c1] | committer: Michael Niedermayer
avcodec/dnxhdenc: check that qmax is within the supported range
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19df5dcb4734d699da7177d5cfc8dc1bdcbf91c1
---
libavcodec/dnxhdenc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index b16c7ed..ab2b7c6 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -341,6 +341,11 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
return -1;
}
+ if (avctx->qmax <= 1) {
+ av_log(avctx, AV_LOG_ERROR, "qmax must be at least 2\n");
+ return AVERROR(EINVAL);
+ }
+
ctx->thread[0] = ctx;
for (i = 1; i < avctx->thread_count; i++) {
ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext));
More information about the ffmpeg-cvslog
mailing list