Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c8f3915f
Commit
c8f3915f
authored
Oct 19, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_decimate: fix memory leaks
Fixes #8311
parent
723d69f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
vf_decimate.c
libavfilter/vf_decimate.c
+10
-0
No files found.
libavfilter/vf_decimate.c
View file @
c8f3915f
...
...
@@ -217,11 +217,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_free
(
&
dm
->
queue
[
i
].
frame
);
}
else
{
AVFrame
*
frame
=
dm
->
queue
[
i
].
frame
;
dm
->
queue
[
i
].
frame
=
NULL
;
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
&&
dm
->
start_pts
==
AV_NOPTS_VALUE
)
dm
->
start_pts
=
frame
->
pts
;
if
(
dm
->
ppsrc
)
{
av_frame_free
(
&
frame
);
frame
=
dm
->
clean_src
[
i
];
dm
->
clean_src
[
i
]
=
NULL
;
}
frame
->
pts
=
av_rescale_q
(
outlink
->
frame_count_in
,
dm
->
ts_unit
,
(
AVRational
){
1
,
1
})
+
(
dm
->
start_pts
==
AV_NOPTS_VALUE
?
0
:
dm
->
start_pts
);
...
...
@@ -314,7 +316,15 @@ static av_cold void decimate_uninit(AVFilterContext *ctx)
av_frame_free
(
&
dm
->
last
);
av_freep
(
&
dm
->
bdiffs
);
if
(
dm
->
queue
)
{
for
(
i
=
0
;
i
<
dm
->
cycle
;
i
++
)
av_frame_free
(
&
dm
->
queue
[
i
].
frame
);
}
av_freep
(
&
dm
->
queue
);
if
(
dm
->
clean_src
)
{
for
(
i
=
0
;
i
<
dm
->
cycle
;
i
++
)
av_frame_free
(
&
dm
->
clean_src
[
i
]);
}
av_freep
(
&
dm
->
clean_src
);
for
(
i
=
0
;
i
<
ctx
->
nb_inputs
;
i
++
)
av_freep
(
&
ctx
->
input_pads
[
i
].
name
);
...
...
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