Hello, This is the second patch of the group which adds the option to use CUDA context current to calling thread. It simplifies the usage of ffmpeg libraries in applications which rely on CUDA runtime API. Example: AVDictionary *opts = NULL; AVBufferRef *hwDeviceCtx; av_dict_set(&opts, "current_ctx", "1", 0); av_hwdevice_ctx_create(&hwDeviceCtx, type, NULL, opts, 0);