Commit b0f270fd authored by Michael Niedermayer's avatar Michael Niedermayer

deshake: move angles from stack to heap.

Fixes Ticket530
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1e4da603
...@@ -251,7 +251,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2, ...@@ -251,7 +251,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
int contrast; int contrast;
int pos; int pos;
double angles[1200]; double *angles= av_malloc(sizeof(double)*width*height/(16*deshake->blocksize));
double totalangles = 0; double totalangles = 0;
int center_x = 0, center_y = 0; int center_x = 0, center_y = 0;
...@@ -327,6 +327,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2, ...@@ -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); 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_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) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment