OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa74810
)
snowenc: check minimum resolution
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Jul 2013 19:10:45 +0000
(21:10 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Jul 2013 19:10:45 +0000
(21:10 +0200)
Fixes Ticket1855
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snowenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/snowenc.c
b/libavcodec/snowenc.c
index
7266ee1
..
586dc1d
100644
(file)
--- 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;