[FFmpeg-devel] [PATCH 2/7] libpostproc: check minimum size
Michael Niedermayer
michael at niedermayer.cc
Fri May 2 01:27:30 EEST 2025
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libpostproc/postprocess.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 0223bab5484..eab22289192 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -896,6 +896,11 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
int minStride= FFMAX(FFABS(srcStride[0]), FFABS(dstStride[0]));
int absQPStride = FFABS(QPStride);
+ if (width < 16 || height < 16) {
+ av_log(c, AV_LOG_ERROR, "Postproc is designed to filter 16x16 macroblock based formats, the minimum size is 1 macroblock\n");
+ return;
+ }
+
// c->stride and c->QPStride are always positive
if(c->stride < minStride || c->qpStride < absQPStride)
reallocBuffers(c, width, height,
--
2.49.0
More information about the ffmpeg-devel
mailing list