1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_idet: flush internal buffers on parameter changes

This is needed to auto insert the filter by default

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-19 05:36:27 +01:00
parent 723c37d3b7
commit 56a33b232c

View File

@ -249,6 +249,18 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
return ff_filter_frame(ctx->outputs[0], picref);
}
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->prev);
av_frame_free(&idet->cur );
av_frame_free(&idet->next);
}
if (idet->prev)
av_frame_free(&idet->prev);
idet->prev = idet->cur;