mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
libpostproc: check minimum size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 917c15435a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d0f89c457d
commit
f7a26950cc
1 changed files with 5 additions and 0 deletions
|
|
@ -897,6 +897,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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue