summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-18 18:28:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-18 18:28:59 +0200
commit9f88db5df1410c6b9f08be77fa119009f63106a6 (patch)
treeeecf2a13a44ecb411f7372810e471143f44d70c7 /libavfilter/vf_deshake.c
parentf49564c6075935443323abf4571a62205e7b3c59 (diff)
avfilter/vf_deshake: check rx
Fixes crash on SSE2 Fixes Ticket2443 Note, its possible to restructure the code to avoid the 16pixel limitation, and such change is welcome! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_deshake.c')
-rw-r--r--libavfilter/vf_deshake.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index fd7213274b..4729c7e30a 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -355,6 +355,11 @@ static av_cold int init(AVFilterContext *ctx)
deshake->blocksize /= 2;
deshake->blocksize = av_clip(deshake->blocksize, 4, 128);
+ if (deshake->rx % 16) {
+ av_log(ctx, AV_LOG_ERROR, "rx must be a multiple of 16\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
if (deshake->filename)
deshake->fp = fopen(deshake->filename, "w");
if (deshake->fp)