CudaCodec::VideoReader runtime error

I am using opencv.4.7 dev in RHEL 9.
Using VideoReader and VideoWriter was working smoothly. All of a sudden running codec calls giving error.

Also for VideoWriter too

Terminate called after throwing an instance of cv::Exception What () video_parser.cpp:63 -217 Gpu API call unknown error code [Code = 1411302816] in function ‘VideoParser’
aborted core dumped.

Help me to solve this asap.

What changed? Have you accidently overitten your libs with the stubs?

What is the video source?

Welcome! MRE required.