summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-04 18:32:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-04 18:32:36 +0200
commitb0f270fdeff35d9084330cc6c2644654f77c2cea (patch)
tree8c37c2b505457aa4507c34f026c212b60a9ab051 /libavfilter/vf_deshake.c
parent1e4da6031ca8784448a8fec15ec108d44c57d41d (diff)
deshake: move angles from stack to heap.
Fixes Ticket530 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_deshake.c')
-rw-r--r--libavfilter/vf_deshake.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index d010389e4c..45730ba113 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -251,7 +251,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
int contrast;
int pos;
- double angles[1200];
+ double *angles= av_malloc(sizeof(double)*width*height/(16*deshake->blocksize));
double totalangles = 0;
int center_x = 0, center_y = 0;
@@ -327,6 +327,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
t->angle = av_clipf(t->angle, -0.1, 0.1);
//av_log(NULL, AV_LOG_ERROR, "%d x %d\n", avg->x, avg->y);
+ av_free(angles);
}
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)