Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-09 23:10:45 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-07-09 23:10:45 +0400
commit325411a687c4b9a439a42bf607d5fbfc41c44836 (patch)
treecf785ace2af75ad34864cde823e2df73a629c18f /libavcodec/snowenc.c
parentaa74810fc6b9afe21c9be3725e3d078d10633670 (diff)
snowenc: check minimum resolution
Fixes Ticket1855 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r--libavcodec/snowenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 7266ee12f0..586dc1d830 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -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;