vf_deshake: set cur_buf to NULL.

Fix a segfault.
This commit is contained in:
Nicolas George 2012-07-23 22:20:31 +02:00
parent 6d4c97bb85
commit ddcb99bb51
1 changed files with 1 additions and 0 deletions

View File

@ -435,6 +435,7 @@ static int end_frame(AVFilterLink *link)
float alpha = 2.0 / deshake->refcount; float alpha = 2.0 / deshake->refcount;
char tmp[256]; char tmp[256];
link->cur_buf = NULL; /* it is in 'in' now */
if (deshake->cx < 0 || deshake->cy < 0 || deshake->cw < 0 || deshake->ch < 0) { if (deshake->cx < 0 || deshake->cy < 0 || deshake->cw < 0 || deshake->ch < 0) {
// Find the most likely global motion for the current frame // Find the most likely global motion for the current frame
find_motion(deshake, (deshake->ref == NULL) ? in->data[0] : deshake->ref->data[0], in->data[0], link->w, link->h, in->linesize[0], &t); find_motion(deshake, (deshake->ref == NULL) ? in->data[0] : deshake->ref->data[0], in->data[0], link->w, link->h, in->linesize[0], &t);