summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-12-01 19:27:35 +0100
committerPaul B Mahol <onemda@gmail.com>2022-12-01 19:29:26 +0100
commit0d6a6c87500715212f2f537c62b837a630fafb49 (patch)
treea4ddae9565b9274d8ef8656cce5fb75cdb18a344 /libavcodec
parent4d38d4607cce5831918eca981972ed64740c9ee6 (diff)
avcodec/cfhdenc: height < 4 is not supported
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cfhdenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 29e6aa1280..6003c83237 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -258,6 +258,11 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
if (ret < 0)
return ret;
+ if (avctx->height < 4) {
+ av_log(avctx, AV_LOG_ERROR, "Height must be >= 4.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (avctx->width & 15) {
av_log(avctx, AV_LOG_ERROR, "Width must be multiple of 16.\n");
return AVERROR_INVALIDDATA;