ffmpeg: assert against creation of cycles in the pools linked list.