Even though libmfx might not need them anymore, avcodec might still access the surfaces. So free them separately at the end.