Commit 7f4eb4f6 authored by Manfred Georg's avatar Manfred Georg

set ffmpeg mutex to NULL on destruction.

The Mutex manager registered with ffmpeg must reset the mutex to NULL after destruction, otherwise ffmpeg will give the invalid mutex to the next mutex manager when it asks it to CREATE a new mutex.
See ffmpeg code: http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/utils.c;h=28c5785398fcf11a3d3c70a8cd09e9df798e2734;hb=HEAD#l3423

Cherry picked from head (file has moved but issue is the same).
Conflicts:
	modules/videoio/src/cap_ffmpeg_impl.hpp
parent 467f5fc9
......@@ -485,6 +485,7 @@ static int LockCallBack(void **mutex, AVLockOp op)
localMutex->destroy();
free(localMutex);
localMutex = NULL;
*mutex = NULL;
break;
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment