History

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.

Ting Fu committed 4 years ago

Commit 130d19b1 parent 4e145f11 file · +3 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_sr.c+3−2
@@ -159,8 +159,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 158 unmodified lines
159 sws_scale(ctx->sws_uv_scale, (const uint8_t **)(in->data + 2), in->linesize + 2,159 sws_scale(ctx->sws_uv_scale, (const uint8_t **)(in->data + 2), in->linesize + 2,
160 0, ctx->sws_uv_height, out->data + 2, out->linesize + 2);160 0, ctx->sws_uv_height, out->data + 2, out->linesize + 2);
161 }161 }
162 162 if (in != out) {
163 av_frame_free(&in);163 av_frame_free(&in);
164 }
164 return ff_filter_frame(outlink, out);165 return ff_filter_frame(outlink, out);
165}166}
166 167

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t