History

avfilter/vf_scale_cuda: unload cuModule on uninit

leozhang committed 6 years ago

Commit b9727871 parent d40679d1 file · +10 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_scale_cuda.c+10−0
@@ -120,6 +120,16 @@ static av_cold void cudascale_uninit(AVFilterContext *ctx) · 119 unmodified lines
120120 {
121121 CUDAScaleContext *s = ctx->priv;
122122
123+ if (s->hwctx && s->cu_module) {
124+ CudaFunctions *cu = s->hwctx->internal->cuda_dl;
125+ CUcontext dummy;
126+
127+ CHECK_CU(cu->cuCtxPushCurrent(s->hwctx->cuda_ctx));
128+ CHECK_CU(cu->cuModuleUnload(s->cu_module));
129+ s->cu_module = NULL;
130+ CHECK_CU(cu->cuCtxPopCurrent(&dummy));
131+ }
132+
123133 av_frame_free(&s->frame);
124134 av_buffer_unref(&s->frames_ctx);
125135 av_frame_free(&s->tmp_frame);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t