You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user