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

lavf/sr: fix the segmentation fault caused by incorrect input frame free.

This issue would cause segmetaion fault when running srcnn model with
sr filter by TensorFlow backend. This filter would free the frame incorectly.

Signed-off-by: Ting Fu <ting.fu@intel.com>
This commit is contained in:
Ting Fu 2022-06-27 18:02:30 +08:00 committed by Guo Yejun
parent 4e145f1dcd
commit 130d19bf20

View File

@ -159,8 +159,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
sws_scale(ctx->sws_uv_scale, (const uint8_t **)(in->data + 2), in->linesize + 2,
0, ctx->sws_uv_height, out->data + 2, out->linesize + 2);
}
if (in != out) {
av_frame_free(&in);
}
return ff_filter_frame(outlink, out);
}