Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.video
Commits
03973106
Commit
03973106
authored
Oct 17, 2018
by
André Anjos
💬
Browse files
Got the leak! Use proper frame deallocation routine
parent
3f4b79c2
Pipeline
#24404
passed with stage
in 10 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/io/video/cpp/utils.cpp
View file @
03973106
...
...
@@ -472,7 +472,7 @@ boost::shared_ptr<AVStream> bob::io::video::make_stream(
}
static
void
deallocate_frame
(
AVFrame
*
f
)
{
av_freep
(
&
f
->
data
[
0
]);
if
(
f
->
data
[
0
])
av_freep
(
&
f
->
data
[
0
]);
av_frame_unref
(
f
);
av_frame_free
(
&
f
);
}
...
...
@@ -505,7 +505,7 @@ bob::io::video::make_frame(const std::string& filename,
}
static
void
deallocate_empty_frame
(
AVFrame
*
f
)
{
if
(
f
)
av
_free
(
f
);
av_frame
_free
(
&
f
);
}
boost
::
shared_ptr
<
AVFrame
>
bob
::
io
::
video
::
make_empty_frame
(
const
std
::
string
&
filename
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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