+ av_frame_free(&idet->prev);
+
+ if( picref->width != link->w
+ || picref->height != link->h
+ || picref->format != link->format) {
+ link->dst->inputs[0]->format = picref->format;
+ link->dst->inputs[0]->w = picref->width;
+ link->dst->inputs[0]->h = picref->height;
+
+ av_frame_free(&idet->cur );
+ av_frame_free(&idet->next);
+ }
+