Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2018-10-24 20:39:13 +0300
committerPhilip Langdale <philipl@overt.org>2018-10-24 20:43:41 +0300
commit2d0ee127be14f44df19790d3aab5b551319f4a62 (patch)
treed90bbfc2f2fb25084d679e125c561bf3a4e09e2e /libavcodec/nvdec.c
parent22d6d916494498cb6a7a1f8abb5d73f0030b4f78 (diff)
avcodec/nvdec: Push the context before destroying the decoder
This has no visible effects but I happened to run under the cuda memcheck tool and it called it out as an error.
Diffstat (limited to 'libavcodec/nvdec.c')
-rw-r--r--libavcodec/nvdec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index e779be3a45..4dd6b1acf3 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -149,8 +149,12 @@ static void nvdec_decoder_free(void *opaque, uint8_t *data)
{
NVDECDecoder *decoder = (NVDECDecoder*)data;
- if (decoder->decoder)
+ if (decoder->decoder) {
+ CUcontext dummy;
+ decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx);
decoder->cvdl->cuvidDestroyDecoder(decoder->decoder);
+ decoder->cudl->cuCtxPopCurrent(&dummy);
+ }
av_buffer_unref(&decoder->hw_device_ref);