Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GStreamer
gst-plugins-bad
Commits
5898acce
Commit
5898acce
authored
Mar 26, 2019
by
Seungha Yang
🐑
Committed by
Tim-Philipp Müller
May 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvenc: Don't leak CUDA device memory
Allocated device memory should be freed with cuMemFree
parent
1410f521
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
sys/nvenc/gstnvbaseenc.c
sys/nvenc/gstnvbaseenc.c
+6
-0
No files found.
sys/nvenc/gstnvbaseenc.c
View file @
5898acce
...
...
@@ -1012,6 +1012,12 @@ gst_nv_base_enc_free_buffers (GstNvBaseEnc * nvenc)
GST_ERROR_OBJECT
(
nvenc
,
"Failed to unregister resource %p, ret %d"
,
in_gl_resource
,
nv_ret
);
nv_ret
=
cuMemFree
((
CUdeviceptr
)
in_gl_resource
->
cuda_pointer
);
if
(
nv_ret
!=
NV_ENC_SUCCESS
)
{
GST_ERROR_OBJECT
(
nvenc
,
"Failed to free CUDA device memory, ret %d"
,
nv_ret
);
}
g_free
(
in_gl_resource
);
cuCtxPopCurrent
(
NULL
);
}
else
...
...
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