1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

snowenc: check minimum resolution

Fixes Ticket1855

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-07-09 21:10:45 +02:00
parent aa74810fc6
commit 325411a687

View File

@ -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;