Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
2b27f7fb
Commit
2b27f7fb
authored
Mar 17, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/thumbnail: replace frame unref with free.
Fixes memleak spotted by FATE.
parent
f7ab23b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vf_thumbnail.c
libavfilter/vf_thumbnail.c
+2
-2
No files found.
libavfilter/vf_thumbnail.c
View file @
2b27f7fb
...
...
@@ -113,7 +113,7 @@ static AVFrame *get_best_frame(AVFilterContext *ctx)
for
(
i
=
0
;
i
<
nb_frames
;
i
++
)
{
memset
(
thumb
->
frames
[
i
].
histogram
,
0
,
sizeof
(
thumb
->
frames
[
i
].
histogram
));
if
(
i
!=
best_frame_idx
)
av_frame_
unref
(
thumb
->
frames
[
i
].
buf
);
av_frame_
free
(
&
thumb
->
frames
[
i
].
buf
);
}
thumb
->
n
=
0
;
...
...
@@ -162,7 +162,7 @@ static av_cold void uninit(AVFilterContext *ctx)
int
i
;
ThumbContext
*
thumb
=
ctx
->
priv
;
for
(
i
=
0
;
i
<
thumb
->
n_frames
&&
thumb
->
frames
[
i
].
buf
;
i
++
)
av_frame_
unref
(
thumb
->
frames
[
i
].
buf
);
av_frame_
free
(
&
thumb
->
frames
[
i
].
buf
);
av_freep
(
&
thumb
->
frames
);
}
...
...
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