Assertion fctx error

Hi all,
Been running into this error message repeately.
“Assertion fctx->async_lock failed at libavcodec/pthread_frame.c:167”

Anyone knows how to solve it? TIA

there isn’t an issue on this yet.

what do you need to do to make that happen? what version of OpenCV do you use, on what OS?

Windows 10 with latest updates

Happens in the in these lines:

self.capture = cv2.VideoCapture(self.RTSP)
if self.capture.isOpened():
  self.status, self.frame =

Searched online and saw a someone mentioning same issue but with “c:155” vs mine of “c:167”

oh, so this involves… RTSP? this is the first time you mention it. any other specifics that might be useful to know?

My bad. Yes, RTSP. Happens randomly. Tried some try-catch blocks variations but couldn’t catch the error.

hi, are u found solution for this error, i am facing with the same thing