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

Unified · Split

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

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