Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
9bdb476c
Commit
9bdb476c
authored
Feb 10, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_avgblur: fix memory leaks if config_input() is called again
parent
9809f318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
vf_avgblur.c
libavfilter/vf_avgblur.c
+9
-7
No files found.
libavfilter/vf_avgblur.c
View file @
9bdb476c
...
...
@@ -187,12 +187,21 @@ static void build_lut(AVFilterContext *ctx, int max)
}
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
AverageBlurContext
*
s
=
ctx
->
priv
;
av_freep
(
&
s
->
buffer
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
);
AverageBlurContext
*
s
=
ctx
->
priv
;
uninit
(
ctx
);
s
->
depth
=
desc
->
comp
[
0
].
depth
;
s
->
max
=
1
<<
s
->
depth
;
s
->
planewidth
[
1
]
=
s
->
planewidth
[
2
]
=
AV_CEIL_RSHIFT
(
inlink
->
w
,
desc
->
log2_chroma_w
);
...
...
@@ -316,13 +325,6 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
return
0
;
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
AverageBlurContext
*
s
=
ctx
->
priv
;
av_freep
(
&
s
->
buffer
);
}
static
const
AVFilterPad
avgblur_inputs
[]
=
{
{
.
name
=
"default"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment