Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CUDA_ERROR_INVALID_CONTEXT from cuMemcpy2D #208

Merged
merged 1 commit into from
May 19, 2023

Conversation

thesword53
Copy link
Contributor

Video deinterlacing in mpv fails because of missing VAAPI profile then it fallbacks to software filter and fails again on cuMemcpy2D with CUDA_ERROR_INVALID_CONTEXT (error 201) when downloading frames from CUDA:

     18365.227291870 [35491-35491] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c: 647           nvCreateConfig got profile: -1 with 0 attributes
     18365.227305272 [35491-35491] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c: 652           nvCreateConfig Profile not supported: -1

[vavpp] vaCreateConfig() failed (the requested VAProfile is not supported)
[deint] Creating filter 'vavpp' failed.
[deint]      18365.227330081 [35491-35501] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c:2052    nvExportSurfaceHandle Exporting surface: 3 (0x55e3526c8f10)
     18365.227342665 [35491-35501] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c:2065    nvExportSurfaceHandle Exporting with 1440 1080 0 1472 3000000004fe014 0 1472 3000000004fe014
creating deinterlacer failed
[autoconvert] HW-downloading from vaapi
     18365.233274434 [35491-35491] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c:1444            nvCreateImage created image id: 162
     18365.233289783 [35491-35491] ../nvidia-vaapi-driver-0.0.9/src/vabackend.c:1592               nvGetImage cuMemcpy2D failed: 201
[ffmpeg] AVHWFramesContext: Failed to read image from surface 0xf: 23 (internal decoding error).
[hwdownload] Could not copy hardware frame to CPU memory.
[ffmpeg] Impossible to convert between the formats supported by the filter 'mpv_src_default_in' and the filter 'auto_scale_0'
[lavfi] failed to configure the filter graph
Disabling filter userdeint because it has failed.

The pull request fixes the issue.

@elFarto elFarto merged commit 5ad7fae into elFarto:master May 19, 2023
@elFarto
Copy link
Owner

elFarto commented May 19, 2023

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants