@@ -528,12 +528,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
/* facedetect filter will passthrought the input frame */
if (strcmp(s->name, "facedetect")) {
- out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
- if (!out) {
- av_frame_free(&in);
- return AVERROR(ENOMEM);
- }
- av_frame_copy_props(out, in);
+ out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
+ if (!out) {
+ av_frame_free(&in);
+ return AVERROR(ENOMEM);
+ }
+ av_frame_copy_props(out, in);
} else {
out = in;
}
@@ -541,9 +541,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
fill_iplimage_from_frame(&inimg , in , inlink->format);
if (strcmp(s->name, "facedetect")) {
- fill_iplimage_from_frame(&outimg, out, inlink->format);
- s->end_frame_filter(ctx, &inimg, &outimg);
- fill_frame_from_iplimage(out, &outimg, inlink->format);
+ fill_iplimage_from_frame(&outimg, out, inlink->format);
+ s->end_frame_filter(ctx, &inimg, &outimg);
+ fill_frame_from_iplimage(out, &outimg, inlink->format);
} else {
s->end_frame_filter(ctx, &inimg, NULL);
}
@@ -553,7 +553,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
if (out != in)
- av_frame_free(&in);
+ av_frame_free(&in);
return ff_filter_frame(outlink, out);
}