mkv.cpp: store the prev/next UID for later use