Commit 325411a6 authored by Michael Niedermayer's avatar Michael Niedermayer

snowenc: check minimum resolution

Fixes Ticket1855
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent aa74810f
......@@ -1770,6 +1770,11 @@ redo_frame:
|| !(height>>(s->chroma_v_shift + s->spatial_decomposition_count)))
s->spatial_decomposition_count--;
if (s->spatial_decomposition_count <= 0) {
av_log(avctx, AV_LOG_ERROR, "Resolution too low\n");
return AVERROR(EINVAL);
}
s->m.pict_type = pic->pict_type;
s->qbias = pic->pict_type == AV_PICTURE_TYPE_P ? 2 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment